データテーブルが有効時間日に保存された後、現在の開始時間+有効日を認識して終了時間を計算する必要があります。
private void cobGlueType_SelectedIndexChanged(object sender, EventArgs e)
{
string strMatType = this.cmbMatType.Text.Trim();
if (this.cmbMatType.SelectedIndex >= 0)
{
DataTable dt = conn.GetGMRule(strMatType);
foreach (DataRow item in dt.Rows)
{
this.cmbMatRule.Items.Add(item["RULENAME"]);
this.cmbVendor.Items.Add(item["GLUEVENDOR"]);
cmbMatRule.SelectedIndex = 0;
cmbVendor.SelectedIndex = 0;
this.dtpEndTime.Value = dtpStartTime.Value.AddDays(Convert.ToInt32(item["EFFECTIVE_DAYS"]));
}
}
}