/// <summary> /// 设置 /// </summary> public override void EntitySet() { CheckOperation entity = new CheckOperation(); entity.ID = HTDataID; bool findFlag = entity.SelectByID(); txtFormNo.Text = entity.FormNo.ToString(); txtOrderCode.Text = entity.OrderCode.ToString(); txtMakeDate.DateTime = entity.MakeDate; drpVendorID.EditValue = entity.VendorID; txtRemark.Text = entity.Remark.ToString(); txtDVendorCon.Text = entity.DVendorCon.ToString(); drpSaleOPID.EditValue = entity.SaleOPID; txtTotalAmount.Text = entity.TotalAmount.ToString(); txtTotalCheckAmount.Text = entity.TotalCheckAmount.ToString(); txtTotalCheckQty.Text = entity.TotalQty.ToString(); drpDZType.EditValue = entity.DZTypeID; HTDataSubmitFlag = entity.SubmitFlag; HTDataDelFlag = entity.DelFlag; if (!findFlag) { } BindGridDts(); }
/// <summary> /// 设置 /// </summary> public override void EntitySet() { CheckOperation entity = new CheckOperation(); entity.ID = HTDataID; bool findFlag = entity.SelectByID(); txtFormNo.Text = entity.FormNo.ToString(); txtOrderCode.Text = entity.OrderCode.ToString(); txtMakeDate.DateTime = entity.MakeDate; drpDZType.EditValue = entity.DZTypeID; drpVendorID.EditValue = entity.VendorID; txtRemark.Text = entity.Remark.ToString(); txtDVendorCon.Text = entity.DVendorCon.ToString(); drpSaleOPID.EditValue = entity.SaleOPID; txtTotalAmount.Text = entity.TotalAmount.ToString(); txtTotalCheckAmount.Text = entity.TotalCheckAmount.ToString(); txtTotalQty.Text = entity.TotalQty.ToString(); drpCheckMethodType.EditValue = entity.CheckMethodTypeID; HTDataSubmitFlag = entity.SubmitFlag; HTDataDelFlag = entity.DelFlag; txtThisExAmount.Text = entity.ThisExAmount.ToString(); txtThisInvoiceAmount.Text = entity.ThisInvoiceAmount.ToString(); txtThisInvoiceQty.Text = entity.ThisInvoiceQty.ToString(); txtPreExAmount.Text = entity.PreExAmount.ToString(); txtPreInvoiceAmount.Text = entity.PreInvoiceAmount.ToString(); txtPreInvoiceQty.Text = entity.PreInvoiceQty.ToString(); txtFormDate.DateTime = entity.FormDate; IsMerge = entity.MergeFlage; txtInvoiceApplyNo.Text = entity.InvoiceApplyNo; if (!findFlag) { } BindGridDts(); //BindGrid2(); //BindGrid3(); }
private void frmCheckOperation2Edit_FormClosing(object sender, FormClosingEventArgs e) { try { if (HTDataID > 0) { CheckOperation entity = new CheckOperation(); entity.ID = HTDataID; entity.SelectByID(); if (entity.SubmitFlag == 0) { if (DialogResult.Yes != ShowConfirmMessage(this.Text + Environment.NewLine + "没有提交单据,是否确认关闭窗体")) { e.Cancel = true; } } } } catch (Exception E) { this.ShowMessage(E.Message); } }
/// <summary> /// 获得实体 /// </summary> /// <returns></returns> private CheckOperation EntityGet() { CheckOperation entity = new CheckOperation(); entity.ID = HTDataID; entity.SelectByID(); entity.FormNo = txtFormNo.Text.Trim(); entity.OrderCode = txtOrderCode.Text.Trim(); entity.VendorID = SysConvert.ToString(drpVendorID.EditValue); entity.FormDate = txtFormDate.DateTime; entity.Remark = txtRemark.Text.Trim(); entity.DVendorCon = txtDVendorCon.Text.Trim(); entity.SaleOPID = SysConvert.ToString(drpSaleOPID.EditValue); entity.TotalAmount = SysConvert.ToDecimal(txtTotalAmount.Text.Trim()); entity.TotalCheckAmount = SysConvert.ToDecimal(txtTotalCheckAmount.Text.Trim()); entity.DZTypeID = SysConvert.ToInt32(drpDZType.EditValue); entity.CheckMethodTypeID = SysConvert.ToInt32(drpCheckMethodType.EditValue); entity.PreExAmount = SysConvert.ToDecimal(txtPreExAmount.Text.Trim()); entity.PreInvoiceAmount = SysConvert.ToDecimal(txtPreInvoiceAmount.Text.Trim()); entity.PreInvoiceQty = SysConvert.ToDecimal(txtPreInvoiceQty.Text.Trim()); entity.ThisExAmount = SysConvert.ToDecimal(txtThisExAmount.Text.Trim()); entity.ThisInvoiceAmount = SysConvert.ToDecimal(txtThisInvoiceAmount.Text.Trim()); entity.ThisInvoiceQty = SysConvert.ToDecimal(txtThisInvoiceQty.Text.Trim()); entity.MergeFlage = IsMerge; entity.InvoiceApplyNo = txtInvoiceApplyNo.Text.Trim(); if (HTFormStatus == FormStatus.新增) { entity.MakeOPID = FParamConfig.LoginID; entity.MakeOPName = FParamConfig.LoginName; entity.MakeDate = txtMakeDate.DateTime.Date; } return(entity); }
/// <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; CheckOperation entity = new CheckOperation(sqlTrans); entity.ID = p_FormID; entity.SelectByID(); if (entity.SubmitFlag == p_Type)//如果相同异常 { throw new Exception("单据状态重复设置,请关闭程序重新打开操作"); } //更新状态 sql = "UPDATE Finance_CheckOperation SET SubmitFlag=" + SysString.ToDBString(p_Type) + " WHERE ID=" + p_FormID; sqlTrans.ExecuteNonQuery(sql); if (entity.MergeFlage == 1) { SetCheckOperationTotal(p_FormID, p_Type, sqlTrans); } else { SetCheckOperation(p_FormID, p_Type, sqlTrans);//回填数据处理 } } catch (BaseException) { throw; } catch (Exception E) { throw new BaseException(E.Message); } }
/// <summary> /// 获得实体 /// </summary> /// <returns></returns> private CheckOperation EntityGet() { CheckOperation entity = new CheckOperation(); entity.ID = HTDataID; entity.SelectByID(); entity.FormNo = txtFormNo.Text.Trim(); entity.OrderCode = txtOrderCode.Text.Trim(); entity.MakeOPID = FParamConfig.LoginID; entity.MakeOPName = FParamConfig.LoginName; entity.MakeDate = txtMakeDate.DateTime.Date; entity.VendorID = SysConvert.ToString(drpVendorID.EditValue); entity.FormDate = DateTime.Now.Date; entity.Remark = txtRemark.Text.Trim(); entity.DVendorCon = txtDVendorCon.Text.Trim(); entity.SaleOPID = SysConvert.ToString(drpSaleOPID.EditValue); entity.TotalAmount = SysConvert.ToDecimal(txtTotalAmount.Text.Trim()); entity.TotalCheckAmount = SysConvert.ToDecimal(txtTotalCheckAmount.Text.Trim()); entity.DZTypeID = SysConvert.ToInt32(drpDZType.EditValue); return(entity); }