Example #1
0
        protected override bool SaveAdd()
        {
            XEquipmentCheckBusiness business = this.m_Business as XEquipmentCheckBusiness;

            //this.m_CurrentModel.ModelStatus == XModelStatus.Add;
            return(business.Checked(this.m_CurrentModel, XCommon.LoginUsersInfo.RID));
        }
Example #2
0
        protected override bool SaveEdit()
        {
            XEquipmentCheckBusiness business = this.m_Business as XEquipmentCheckBusiness;

            if (chkcopy.Checked == false)
            {
                //2016-11-21,mxj,add
                if (chknumtb.Checked)
                {
                    XVEquipmentCheckInfo info = this.m_CurrentModel as XVEquipmentCheckInfo;
                    string sql      = "update  EquipmentReceive set Quanlity=" + XHelper.GetInt(this.nebQuanlity.Value) + " ,ReceiveDate='" + dtUseTime.Value.ToString("yyyy-MM-dd") + " 00:00:00' ";
                    string sqlwhere = " where  EquipmentCheckId='" + info.RID + "'";

                    if (chkCheckedDate.Checked)
                    {
                        sql = sql + " , CheckedDate='" + dtCheckedDate.Value.ToString("yyyy-MM-dd") + " 00:00:00'";
                    }
                    if (chkVerifyedDate.Checked)
                    {
                        sql = sql + " , VerifyedDate='" + dtVerifyedDate.Value.ToString("yyyy-MM-dd") + " 00:00:00'";
                    }
                    if (chkSignedDate.Checked)
                    {
                        sql = sql + " , SignedDate='" + dtSignedDate.Value.ToString("yyyy-MM-dd") + " 00:00:00'";
                    }


                    sql = sql + sqlwhere;

                    if (SQLHelper.ExecuteCommand(sql) > 0)
                    {
                    }
                }
                return(business.Update(this.m_CurrentModel));
            }
            else
            {
                this.m_CurrentModel.ModelStatus = XModelStatus.Add;

                return(business.Checked(this.m_CurrentModel, XCommon.LoginUsersInfo.RID));
            }
        }