예제 #1
0
        private void Save()
        {
            T_OA_WELFAREDISTRIBUTEDETAIL welfarePaymentDetailsRoom = welfarePaymentDetails;
            string ContractModified = DateTime.Now.ToShortDateString();                               //修改时间

            welfarePaymentDetailsRoom.UPDATEDATE        = Convert.ToDateTime(ContractModified);       //修改时间
            welfarePaymentDetailsRoom.UPDATEUSERID      = Common.CurrentLoginUserInfo.EmployeeID;     //修改人ID
            welfarePaymentDetailsRoom.UPDATEUSERNAME    = Common.CurrentLoginUserInfo.EmployeeName;   //修改人姓名
            welfarePaymentDetailsRoom.REMARK            = txtNotes.Text;                              //发放内容
            welfarePaymentDetailsRoom.STANDARD          = Convert.ToDecimal(txtWelfareStandard.Text); //发放金额
            welfarePaymentDetailsRoom.USERID            = Common.CurrentLoginUserInfo.EmployeeID;
            welfarePaymentDetailsRoom.OWNERID           = Common.CurrentLoginUserInfo.EmployeeID;
            welfarePaymentDetailsRoom.OWNERNAME         = Common.CurrentLoginUserInfo.EmployeeName;
            welfarePaymentDetailsRoom.OWNERCOMPANYID    = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;
            welfarePaymentDetailsRoom.OWNERDEPARTMENTID = Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID;
            welfarePaymentDetailsRoom.OWNERPOSTID       = Common.CurrentLoginUserInfo.UserPosts[0].PostID;

            try
            {
                wsscs.UpdateWelfarePaymentDetailsCompleted += new EventHandler <UpdateWelfarePaymentDetailsCompletedEventArgs>(wsscs_UpdateWelfarePaymentDetailsCompleted);
                wsscs.UpdateWelfarePaymentDetailsAsync(welfarePaymentDetailsRoom);
            }
            catch (Exception ex)
            {
                Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), ex.Message.ToString());
            }
        }
예제 #2
0
        private void myBtn_Click(object sender, RoutedEventArgs e)
        {
            Button DetailBtn                    = sender as Button;
            string ContractModified             = DateTime.Now.ToShortDateString();//修改时间
            T_OA_WELFAREDISTRIBUTEDETAIL detail = DetailBtn.DataContext as T_OA_WELFAREDISTRIBUTEDETAIL;

            detail.UPDATEDATE        = Convert.ToDateTime(ContractModified);     //修改时间
            detail.UPDATEUSERID      = Common.CurrentLoginUserInfo.EmployeeID;   //修改人ID
            detail.UPDATEUSERNAME    = Common.CurrentLoginUserInfo.EmployeeName; //修改人姓名
            detail.USERID            = Common.CurrentLoginUserInfo.EmployeeID;
            detail.OWNERID           = Common.CurrentLoginUserInfo.EmployeeID;
            detail.OWNERNAME         = Common.CurrentLoginUserInfo.EmployeeName;
            detail.OWNERCOMPANYID    = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;
            detail.OWNERDEPARTMENTID = Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID;
            detail.OWNERPOSTID       = Common.CurrentLoginUserInfo.UserPosts[0].PostID;

            try
            {
                wssc.UpdateWelfarePaymentDetailsCompleted += new EventHandler <UpdateWelfarePaymentDetailsCompletedEventArgs>(wsscs_UpdateWelfarePaymentDetailsCompleted);
                wssc.UpdateWelfarePaymentDetailsAsync(detail);
            }
            catch (Exception ex)
            {
                Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), ex.Message.ToString());
            }
        }
 private void myBtn_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         if (DaGrs.SelectedItems.Count > 0)
         {
             BenefitsAdministration.UpdateWelfarePaymentDetailsAsync(DaGrs.SelectedItems[0] as T_OA_WELFAREDISTRIBUTEDETAIL);
         }
     }
     catch (Exception ex)
     {
         Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), ex.ToString());
     }
 }