コード例 #1
0
    /// <summary>
    /// 页面加载
    /// </summary>
    public override void RenderPage()
    {
        if (PlanNotifyID.IsNoNull())
        {
            objWork_PlanNotify = objWorkRule.Work_PlanNotify.FirstOrDefault(s => s.PlanNotifyID == PlanNotifyID);
            if (CheckEditObjectIsNull(objWork_PlanNotify))
            {
                return;
            }

            LoadAddress(objWork_PlanNotify.NotifyType);
            ///通知联系人
            radNotifyAddressID.SelectedValue = objWork_PlanNotify.NotifyAddressID.ToString();
            ///通知类型
            radPlanResult.SelectedValue = objWork_PlanNotify.PlanResult.ToString();
            ///通知方式
            radNotifyType.SelectedValue = objWork_PlanNotify.NotifyType.ToString();

            Page.DataBind();
        }
        else
        {
            LoadAddress(1);
        }
    }
コード例 #2
0
 /// <summary>
 /// 保存信息
 /// </summary>
 public void SaveInfo()
 {
     if (radNotifyAddressID.SelectValueInt == 0)
     {
         MessageDialog("对不起选择通知联系人有误");
         return;
     }
     if (PlanNotifyID.IsNull())
     {
         objWork_PlanNotify.PlanID = PlanID;
         ///通知联系人
         objWork_PlanNotify.NotifyAddressID = radNotifyAddressID.SelectValueInt;
         ///通知类型
         objWork_PlanNotify.PlanResult = radPlanResult.SelectValueInt;
         ///通知方式
         objWork_PlanNotify.NotifyType = radNotifyType.SelectValueInt;
         objWorkRule.InsertPlanNotify(objWork_PlanNotify);
         MessageDialog("新增成功", "PlanNotifyList.aspx?PlanID=" + PlanID + "&WorkInfoID=" + WorkInfoID);
     }
     else
     {
         objWork_PlanNotify = objWorkRule.Work_PlanNotify.FirstOrDefault(p => p.PlanNotifyID == PlanNotifyID);
         if (CheckEditObjectIsNull(objWork_PlanNotify))
         {
             return;
         }
         ///通知联系人
         objWork_PlanNotify.NotifyAddressID = radNotifyAddressID.SelectValueInt;
         ///通知类型
         objWork_PlanNotify.PlanResult = radPlanResult.SelectValueInt;
         ///通知方式
         objWork_PlanNotify.NotifyType = radNotifyType.SelectValueInt;
         objWorkRule.UpdatePlanNotify(objWork_PlanNotify);
         MessageDialog("修改成功", "PlanNotifyList.aspx?PlanID=" + PlanID + "&WorkInfoID=" + WorkInfoID);
     }
 }
コード例 #3
0
 public void UpdatePlanNotify(Work_PlanNotify objWork_PlanNotify)
 {
     this.CurrentEntities.SaveChanges();
 }
コード例 #4
0
 public void InsertPlanNotify(Work_PlanNotify objWork_PlanNotify)
 {
     this.CurrentEntities.AddTowork_plannotify(objWork_PlanNotify);
     this.CurrentEntities.SaveChanges();
 }