/// <summary> /// 获得实体 /// </summary> /// <returns></returns> private SaleOrderJS EntityGet() { SaleOrderJS entity = new SaleOrderJS(); entity.ID = HTDataID; entity.SelectByID(); entity.FormNo = txtFormNo.Text.Trim(); entity.MakeOPID = txtMakeOPID.Text.Trim(); entity.MakeDate = txtMakeDate.DateTime.Date; entity.SO = txtSO.Text.Trim(); entity.SaleOPID = SysConvert.ToString(drpSaleOPID.EditValue); entity.VendorID = SysConvert.ToString(drpVendorID.EditValue); entity.OrderAmount = SysConvert.ToDecimal(txtOrderAmount.Text.Trim()); entity.CGAmount = SysConvert.ToDecimal(txtCGAmount.Text.Trim()); entity.RSAmount = SysConvert.ToDecimal(txtRSAmount.Text.Trim()); entity.ZZAmount = SysConvert.ToDecimal(txtZZAmount.Text.Trim()); entity.RZAmount = SysConvert.ToDecimal(txtRZAmount.Text.Trim()); entity.OtherAmount = SysConvert.ToDecimal(txtOtherAmount.Text.Trim()); entity.HKAmount = SysConvert.ToDecimal(txtHKAmount.Text.Trim()); entity.YSAmount = SysConvert.ToDecimal(txtYSAmount.Text.Trim()); entity.LRAmount = SysConvert.ToDecimal(txtLRAmount.Text.Trim()); entity.Remark = txtRemark.Text.Trim(); return(entity); }
/// <summary> /// 设置 /// </summary> public override void EntitySet() { SaleOrderJS entity = new SaleOrderJS(); entity.ID = HTDataID; bool findFlag = entity.SelectByID(); HTDataFormNo = entity.FormNo; txtFormNo.Text = entity.FormNo.ToString(); txtMakeOPID.Text = entity.MakeOPID.ToString(); txtMakeDate.DateTime = entity.MakeDate; txtSO.Text = entity.SO.ToString(); drpSaleOPID.EditValue = entity.SaleOPID.ToString(); drpVendorID.EditValue = entity.VendorID.ToString(); txtOrderAmount.Text = entity.OrderAmount.ToString(); txtCGAmount.Text = entity.CGAmount.ToString(); txtRSAmount.Text = entity.RSAmount.ToString(); txtZZAmount.Text = entity.ZZAmount.ToString(); txtRZAmount.Text = entity.RZAmount.ToString(); txtOtherAmount.Text = entity.OtherAmount.ToString(); txtHKAmount.Text = entity.HKAmount.ToString(); txtYSAmount.Text = entity.YSAmount.ToString(); txtLRAmount.Text = entity.LRAmount.ToString(); txtRemark.Text = entity.Remark.ToString(); txtCBAmount.Text = entity.CBAmount.ToString(); txtLRPer.Text = entity.LRPer.ToString(); HTDataSubmitFlag = entity.SubmitFlag; HTDataDelFlag = entity.DelFlag; if (!findFlag) { } BindGridDts(); }
/// <summary> /// 审核 /// </summary> /// <param name="p_FormID">单据ID</param> /// <param name="p_Type">0/1/2/3:弃审/审核</param> public void RSubmit(int p_FormID, int p_Type, IDBTransAccess sqlTrans) { try { int p_TempType = p_Type;//处理状态 string sql = string.Empty; SaleOrderJS entity = new SaleOrderJS(sqlTrans); entity.ID = p_FormID; entity.SelectByID(); if (entity.SubmitFlag == p_Type)//如果相同异常 { throw new Exception("单据状态重复设置,请关闭程序重新打开操作"); } sql = "UPDATE Sale_SaleOrderJS SET SubmitFlag=" + SysString.ToDBString(p_Type); sql += " WHERE ID=" + p_FormID.ToString();//更新单据主表审核状态 sqlTrans.ExecuteNonQuery(sql); //if (p_Type == (int)ConfirmFlag.已提交) //{ // sql = "UPDATE Sale_SaleOrder SET JSFlag=1 WHERE FormNo=" + SysString.ToDBString(entity.SO); // sqlTrans.ExecuteNonQuery(sql); //} //else if (p_Type == (int)ConfirmFlag.未提交) //{ // sql = "UPDATE Sale_SaleOrder SET JSFlag=0 WHERE FormNo=" + SysString.ToDBString(entity.SO); // sqlTrans.ExecuteNonQuery(sql); //} } catch (BaseException) { throw; } catch (Exception E) { throw new BaseException(E.Message); } }