/// <summary> /// Handles the Click event of the btnStockDelete control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> /// 整理人:桂书丛 /// 整理时间:2013-02-02 private void btnStockDelete_Click(object sender, EventArgs e) { if (this.gvStockMain.SelectedRowsCount <= 0) { XtraMessageBox.Show("请选择要删除(&D)的项目", "违规操作", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } else { string StockID = this.gvStockMain.GetFocusedRowCellDisplayText(gcStockID).ToString(); DialogResult tempDialogResult = XtraMessageBox.Show("编号为" + StockID + "的数据", "确定删除(&D)?", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (DialogResult.Yes == tempDialogResult) { VariedEnum.OperatorStatus EnOperatorStatus; try { EnOperatorStatus = myBUCMS_Stock.Delete(StockID); if (CommonOperator.HandleOperatorEnum("删除(&D)入库信息", EnOperatorStatus)) { BUT_SysLog.InsertSysLog(VariedEnum.LogType.数据操作, frmAssist.frmLogin.SysUser.UserID, "成功删除(&D)了编号为" + StockID + "的入库信息"); BindGridStock(); } } catch (Exception ex) { XtraMessageBox.Show(ex.Message); } } } }
/// <summary> /// 绑定各查询控件的值,以便查询 /// </summary> /// 整理人:桂书丛 /// 整理时间:2013-02-01 private void BindTextValue() { try { myDataTable = myBUCMS_InGoods.GetOrder(false, string.Empty, string.Empty, false); CommonOperator.DataBindingLookUpEdit(this.txtName, myDataTable, "Name", "ID", true); myDataTable = myBUCMS_InGoods.GetOrder(false, string.Empty, string.Empty, false); CommonOperator.DataBindingLookUpEdit(this.txtSerialNumber, myDataTable, "SerialNumber", "ID", true); myDataTable = myBUCMS_InGoods.GetOrder(false, string.Empty, string.Empty, false); CommonOperator.DataBindingLookUpEdit(this.txtSupplier, myDataTable, "Supplier", "ID", true); myDataTable = myBUCMS_Employee.GetOrder(false, string.Empty, string.Empty, false); btnHandlesPeopleID.Properties.DataSource = myDataTable; CommonOperator.BindLookUpEdit(this.btnHandlesPeopleID, myDataTable, "Name", "ID", false, "员工"); myDataTable = myBUCMS_Stock.GetOrder(false, string.Empty, string.Empty, false); CommonOperator.DataBindingLookUpEdit(this.lookName, myDataTable, "Name", "ID", true); myDataTable = myBUCMS_Stock.GetOrder(false, string.Empty, string.Empty, false); CommonOperator.DataBindingLookUpEdit(this.lookStockSupplier, myDataTable, "Supplier", "ID", true); myDataTable = myBUCMS_Employee.GetOrder(false, string.Empty, string.Empty, false); this.gvLookUpEditHandlesPeopleID.DataSource = myDataTable; cmbTerm_SelectedIndexChanged(null, null); } catch (Exception ex) { XtraMessageBox.Show(ex.Message); } }
async public Task <ConnectionCheckStatus> CheckConnection(string hostname, string token) { using (GitLabTaskRunner client = new GitLabTaskRunner(hostname, token)) { try { await CommonOperator.SearchCurrentUserAsync(client); return(ConnectionCheckStatus.OK); } catch (OperatorException ox) { if (ox.InnerException is GitLabRequestException rx) { if (rx.InnerException is System.Net.WebException wx) { if (wx.Response is System.Net.HttpWebResponse response && response.StatusCode == System.Net.HttpStatusCode.Unauthorized) { return(ConnectionCheckStatus.BadAccessToken); } } } } return(ConnectionCheckStatus.BadHostname); } }
/// <summary> /// 绑定LookUpEdit控件 /// </summary> /// 整理人:桂书丛 /// 整理时间:2013-02-01 private void BindLookUpEmployee() { try { myDataTable = myBUCMS_Employee.GetOrder(false, string.Empty, string.Empty, false); CommonOperator.DataBindingLookUpEdit(this.txtEmpName, myDataTable, "Name", "ID", true); //CommonOperator.BindLookUpEdit(this.txtEmpName, myDataTable, "Name", "ID", false, "员工"); } catch (Exception ex) { XtraMessageBox.Show(ex.Message); } }
/// <summary> /// 绑定各文本框的值 /// </summary> private void BindTextValue() { myDataTable = myBUCMS_Employee.GetOrder(false, string.Empty, string.Empty, false); CommonOperator.DataBindingLookUpEdit(this.txtName, myDataTable, "Name", "ID", true); myDataTable = myBUCMS_DPInfo.GetOrder(false, "SubID", "0", false); CommonOperator.DataBindingLookUpEdit(this.txtDPInfo, myDataTable, "Name", "ID", true); myDataTable = myBUCMS_DPInfo.GetOrder(false, "SubID", "1", false); CommonOperator.DataBindingLookUpEdit(this.txtPosID, myDataTable, "Name", "ID", true); myDataTable = myBUCMS_DPInfo.GetOrder(false, "SubID", "1", false); CommonOperator.DataBindingLookUpEdit(this.txtIDCardNum, myDataTable, "TelPhone", "ID", true); //当前职务 }
private void btnPrint_Click(object sender, EventArgs e) { try { DevExpress.XtraEditors.SimpleButton tempBtn = (DevExpress.XtraEditors.SimpleButton)sender; if (tempBtn == null) { return; } string tempItem = tempBtn.Tag.ToString(); foreach (Control tempControl in this.groupBox4.Controls) { if (tempControl.GetType() == typeof(DevExpress.XtraGrid.GridControl)) { DevExpress.XtraGrid.GridControl tempGridControl = (DevExpress.XtraGrid.GridControl)tempControl; CommonOperator.DataPrint(tempGridControl, tempItem, null); } } } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }
public bool SetOperator(CommonOperator searchOperator) { cmbOperators.SelectedValue = searchOperator; return(false); }
/// <summary> /// 获取流水号和入库时间 /// </summary> private void GetRandomBillID() { this.labSerialNumber.Text = CommonOperator.GetRandomBillID(); txtInDate.Text = DateTime.Now.ToString(); }
public bool SetOperator(CommonOperator searchOperator) { return(false); }
public bool SetOperator(CommonOperator searchOperator) { throw new NotImplementedException(); }
public bool SetOperator(CommonOperator searchOperator) { return(MyControlHelper.SetOperator(searchOperator)); }