/// <summary> /// 删除 /// </summary> public override void EntityDelete() { GBJCRule rule = new GBJCRule(); GBJC entity = EntityGet(); rule.RDelete(entity); }
/// <summary> /// 撤销提交 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> public override void btnSubmitCancel_Click(object sender, EventArgs e) { try { if (!FCommon.RightCheck(this.FormID, this.RightFormID, this.FormListAID, this.FormListBID, RightSub.新增)) { this.ShowMessage("你没有此操作权限"); return; } if (HTDataID == 0) { this.ShowMessage("请选择要操作的记录"); return; } GBJCRule rule = new GBJCRule(); rule.RSubmit(HTDataID, 0); FCommon.AddDBLog(this.Text, FormStatus.提交.ToString(), "ID:" + HTDataID, ""); this.SetPosStatus(HTDataID); BindGrid(); } catch (Exception E) { this.ShowMessage(E.Message); } }
/// <summary> /// 修改 /// </summary> public override void EntityUpdate() { GBJCRule rule = new GBJCRule(); GBJC entity = EntityGet(); //GBJCDts[] entityDts = EntityDtsGet(); rule.RUpdate(entity); }
/// <summary> /// 绑定Grid /// </summary> public override void BindGrid() { GBJCRule rule = new GBJCRule(); gridView1.GridControl.DataSource = rule.RShow(HTDataConditionStr, ProcessGrid.GetQueryField(gridView1)); DataTable dt = rule.RShow(HTDataConditionStr, ProcessGrid.GetQueryField(gridView1)); gridView1.GridControl.Show(); }
/// <summary> /// 新增 /// </summary> public override int EntityAdd() { GBJCRule rule = new GBJCRule(); GBJC entity = EntityGet(); // GBJCDts[] entityDts = EntityDtsGet(); rule.RAdd(entity); return(entity.ID); }
/// <summary> /// 撤销同步 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> public void btnTBCanCel_Click(object sender, EventArgs e) { try { GBJCRule rule = new GBJCRule(); rule.RDelLR(HTDataID); this.ShowInfoMessage("撤销成功!"); TBFlag = 0; } catch (Exception E) { this.ShowMessage(E.Message); } }
/// <summary> /// 条码扫描 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void txtScan_KeyDown(object sender, KeyEventArgs e) { try { if (e.KeyCode == Keys.Enter) { string GBCode = txtScan.Text.Trim(); if (GBCode == "") { this.ShowMessage("请扫描条码"); return; } GBJCRule rule = new GBJCRule(); string sql = "SELECT * FROM Dev_GBJCDts WHERE GBCode=" + SysString.ToDBString(GBCode); DataTable dt = new DataTable(); dt = SysUtils.Fill(sql); if (dt.Rows.Count != 0) { if (SysConvert.ToDecimal(dt.Rows[0]["LYFlag"]) == 1) { this.ShowMessage("此挂板已留样"); //return; } } LYFlag = SysConvert.ToInt32(dt.Rows[0]["LYFlag"]); //if (chkLY.Checked) //{ // LYFlag = 1; //} if (chkCancel.Checked) { if (!CheckCancelFind()) { this.ShowMessage("条码不处于列表内,不能撤销归还"); return; } if (!CheckCancelStatus(GBCode)) { return; } //int MainID = GetGBMainID(GBCode);//若是存在一条未保存和一条提交数据,会取第一行的MainID //rule.RUpdate(GBCode, 0, MainID, LYFlag,FParamConfig.LoginID); rule.RUpdate(GBCode, 0, -1, LYFlag, FParamConfig.LoginID); // 2013.12.26 sc SetGridView1(GBCode); ProcessGrid.GridViewFocus(gridView1, new string[1] { "GBCode" }, new string[1] { GBCode }); gridViewRowChanged1(gridView1); } else { if (!CheckJC()) { return; } CreateDatable(); rule.RUpdate(GBCode, 1, -1, LYFlag, FParamConfig.LoginID); gridViewRowChanged1(gridView1); } txtScan.Text = ""; txtScan.Focus(); } } catch (Exception E) { this.ShowMessage(E.Message); } }