private void btnFPartySearch_Click(object sender, EventArgs e) { //frmSearch search = new frmSearch(); //search.getattributes("GetAccountSearch", null, "Chart Of Accounts"); //search.ShowDialog(); //if (!string.IsNullOrEmpty(MainForm.Searched_Id)) //{ // txtSalesAcc.Text = MainForm.Searched_Id; // MainForm.Searched_Id = string.Empty; //} try { frmSearch search = new frmSearch(); search.getattributes("GetCOASearch", null, "Chart Of Accounts"); search.ShowDialog(); if (!string.IsNullOrEmpty(MainForm.Searched_Id)) { txtFromAcc.Text = MainForm.Searched_Id; MainForm.Searched_Id = string.Empty; } else { txtFromAcc.Text = string.Empty; txtFAccName.Text = string.Empty; txtFromAcc.Focus(); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void btnPAccSearch_Click(object sender, EventArgs e) { try { if (cmbCategory.SelectedIndex == 0) { MessageBox.Show("Please Select Account Category First.", "Account Category not Found", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } frmSearch search = new frmSearch(); Smartworks.ColumnField[] gCOA = new Smartworks.ColumnField[1]; gCOA[0] = new Smartworks.ColumnField("@CategoryId", Convert.ToInt32(cmbCategory.SelectedValue)); search.getattributes("GetCOASearchByCategory", gCOA, "Chart Of Accounts"); search.ShowDialog(); if (!string.IsNullOrEmpty(MainForm.Searched_Id)) { txtPAccCode.Text = MainForm.Searched_Id; MainForm.Searched_Id = string.Empty; } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void btnSearch_Click(object sender, EventArgs e) { try { frmSearch frm = new frmSearch(feedbackManager); DialogResult res = frm.ShowDialog(); if (res == DialogResult.OK) { int selectedFeedbackID = frm.GetSelectedFeedbackID(); List <Feedback> feedbacks = feedbackManager.GetFeedbacks(); for (int i = 0; i < feedbacks.Count; i++) { if (feedbacks[i].feedbackID == selectedFeedbackID) { ShowFeedback(i); break; } } } } catch (Exception ex) { HandleCriticalException(ex); } }
private void btnVoucherToCodeSearch_Click(object sender, EventArgs e) { try { frmSearch search = new frmSearch(); Smartworks.ColumnField[] sVoucher = new Smartworks.ColumnField[1]; sVoucher[0] = new Smartworks.ColumnField("@Type", "CR"); search.getattributes("sp_GetVoucherSearch", sVoucher, "VoucherMaster"); search.ShowDialog(); if (!string.IsNullOrEmpty(MainForm.Searched_Id)) { txtVoucherToCode.Text = MainForm.Searched_Id; MainForm.Searched_Id = string.Empty; } else { txtVoucherToCode.Text = string.Empty; txtVoucherToCode.Focus(); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void btnPSearch_Click(object sender, EventArgs e) { try { if (string.IsNullOrEmpty(txtSONo.Text)) { MessageBox.Show("Please Select Sale Order Number.", "Sale Order is Required.", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } frmSearch search = new frmSearch(); Smartworks.ColumnField[] gSalesOrderProduct = new Smartworks.ColumnField[1]; gSalesOrderProduct[0] = new Smartworks.ColumnField("@SaleOrderNo", txtSONo.Text); search.getattributes("GetProductSearchForSalesOrder", gSalesOrderProduct, "Products"); search.ShowDialog(); if (!string.IsNullOrEmpty(MainForm.Searched_Id)) { txtPCode.Text = MainForm.Searched_Id; MainForm.Searched_Id = string.Empty; } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void button1_Click(object sender, System.EventArgs e) { string sql = "Select EMP_ID,EMP_I1,EMP_NM,DEP_ID,INH_DT From FILB01A Where " + " DEL_BT is null or DEL_BT=0 and DEP_ID in (Select DEP_ID from SYS_SECURITY_DEP" + " where MNU_ID=" + this.Tag + " and ALL_BT=1 and USER_ID=N'" + PublicFunction.A_UserID + "')"; Func.RecordSet rs = new Func.RecordSet(sql, PublicFunction.C_con); frmSearch dlg = new frmSearch(rs, 5, "frmTaStaffInfo_vs"); if (dlg.ShowDialog() == DialogResult.OK) { if (checkBox1.Checked) { txt_WID.Text = rs.record(rs.Bookmarks, "EMP_I1"); } else { txt_WID.Text = rs.record(rs.Bookmarks, "EMP_ID"); } EMP_ID = rs.record(rs.Bookmarks, "EMP_ID"); EMP_I1 = rs.record(rs.Bookmarks, "EMP_I1"); txt_Name.Text = rs.record(rs.Bookmarks, "EMP_NM"); txt_Dep.Text = T_String.GetDataFromSQL("DEP_NM", "FILA02A", "DEP_ID=N'" + rs.record(rs.Bookmarks, "DEP_ID") + "'"); try { txt_INH.Text = DateTime.Parse(rs.record(rs.Bookmarks, "INH_DT") + "").ToString(format); } catch {} txt_item.Focus(); ok = true; } }
private void toolStripButton5_Click(object sender, EventArgs e) { frmSearch f = new frmSearch(); f.Show(); this.Show(); }
private void cmd_frm_Click(object sender, System.EventArgs e) { string sql = ""; sql = "Select EN,CH,VN,ID from SYS_MENU b where "; sql = sql + "TYP_BT=1 and SEC=1 order by EN"; Func.RecordSet rs = new Func.RecordSet(sql, PublicFunction.C_con); Basic.Form.frmSearch dlg = new frmSearch(rs, 3, "frmSecurity_vs1", true); if (dlg.ShowDialog() == DialogResult.OK) { sql = "Select TYP_ID,MNU_ID,ALL_BT from SYS_SECURITY_TYP a where MNU_ID=" + rs.record(rs.Bookmarks, "ID") + " and USER_ID=N'" + vs.Rows[vs.Row]["USER_ID"] + "'"; Func.RecordSet rs1 = new Func.RecordSet(sql, PublicFunction.C_con); for (int i = 0; i < rs1.rows; i++) { if (rs1.record(i, "ALL_BT") == "True") { sql = "Update SYS_SECURITY_TYP set ALL_BT=1" + " where TYP_ID=N'" + rs1.record(i, "TYP_ID") + "' and USER_ID=N'" + vs.Rows[vs.Row]["USER_ID"] + "' and MNU_ID=" + MNU_ID; } else { sql = "Update SYS_SECURITY_TYP set ALL_BT=0" + " where TYP_ID=N'" + rs1.record(i, "TYP_ID") + "' and USER_ID=N'" + vs.Rows[vs.Row]["USER_ID"] + "' and MNU_ID=" + MNU_ID; } PublicFunction.SQL_Execute(sql); } Init_Tree(); } }
private void btnTInvoiceSearch_Click(object sender, EventArgs e) { try { frmSearch search = new frmSearch(); Smartworks.ColumnField[] gInvoice = new Smartworks.ColumnField[2]; gInvoice[0] = new Smartworks.ColumnField("@IsGSTInvoice", DBNull.Value); gInvoice[1] = new Smartworks.ColumnField("@FYear", MainForm.FYear); search.getattributes("GetSearchInvoices", gInvoice, "Invoices"); search.ShowDialog(); if (!string.IsNullOrEmpty(MainForm.Searched_Id)) { txtTInvoice.Text = MainForm.Searched_Id; MainForm.Searched_Id = string.Empty; } else { txtTInvoice.Text = string.Empty; } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void btnFInvoiceSearch_Click(object sender, EventArgs e) { //try //{ // frmSearch search = new frmSearch(); // search.getattributes("GetSearchPurchaseOrders", null, "Purchase Orders"); // search.ShowDialog(); // if (!string.IsNullOrEmpty(MainForm.Searched_Id)) // { // txtFOrder.Text = MainForm.Searched_Id; // MainForm.Searched_Id = string.Empty; // } //} //catch (Exception ex) //{ // MessageBox.Show(ex.Message); //} try { frmSearch search = new frmSearch(); search.getattributes("GetRecevingPOSearch", null, "Receiving PO"); search.ShowDialog(); if (!string.IsNullOrEmpty(MainForm.Searched_Id)) { txtFOrder.Text = MainForm.Searched_Id; MainForm.Searched_Id = string.Empty; } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void buttonX3_Click(object sender, EventArgs e) { try { using (Item item = new Item(true)) { item.Name = nameTxt.Text; item.Code = idTxt.Text == null ? string.Empty : idTxt.Text; //item.Cost = (double)costNud.Value; //item.Price = (double)priceNUD.Value; //item.InStock = (int)inStockNUD.Value; item.MainCategory = categoryCombo.SelectedValue == null ? -1 : (int)categoryCombo.SelectedValue; //item.SubCategory = subcategoryCombo.SelectedValue == null ? 0 : (int)subcategoryCombo.SelectedValue; DataTable ds = item.SelectFind(); frmSearch frmSub = new frmSearch(ds, this.Text, 4); frmSub.Width = 800; HandleSearch(frmSub); } } catch (Exception ex) { MessageView.ExceptionError(ex); } }
private void metroTile6_Click(object sender, EventArgs e) { this.Hide(); frmSearch search = new frmSearch(); search.Show(); }
// hadle operations after search private void HandleSearch(frmSearch frmSub) { //ApplicationSettings.ChildFormView(this.MdiParent, ref frmSub); if (frmSub.ShowDialog() == DialogResult.OK) { FillSearchFilds(frmSub.DataRowValues); } frmSub.Dispose(); }
private void button1_Click(object sender, System.EventArgs e) { Func.RecordSet rs = new Func.RecordSet("Select EMP_ID,EMP_I1,EMP_NM from FILB01A", PublicFunction.C_con); Basic.Form.frmSearch dlg = new frmSearch(rs, 3, "frmTaStaffInfo_vs"); if (dlg.ShowDialog() == DialogResult.OK) { EMP_ID.Text = rs.record(rs.Bookmarks, "EMP_ID"); EMP_NM.Text = rs.record(rs.Bookmarks, "EMP_NM"); } }
private void vs1_CellButtonClick(object sender, C1.Win.C1FlexGrid.RowColEventArgs e) { Func.RecordSet rs = new Func.RecordSet("Select SEC_ID,SEC_NM from P_FILA10A", PublicFunction.C_con); frmSearch dlg = new frmSearch(rs, 2, "frmTaSection_vs"); if (dlg.ShowDialog() == DialogResult.OK) { vs1.Rows[e.Row]["SEC_ID"] = rs.record(rs.Bookmarks, "SEC_ID"); vs1.Rows[e.Row]["SEC_NM"] = rs.record(rs.Bookmarks, "SEC_NM"); } }
// hadle operations after search private void HandleSearch(frmSearch frmSub) { //ApplicationSettings.ChildFormView(this.MdiParent, ref frmSub); if (frmSub.ShowDialog() == DialogResult.OK) { FillSearchFilds(frmSub.DataRowValues); deleteBtn.Enabled = true; addbtn.Text = "Update"; } frmSub.Dispose(); }
public void ShowSearchFormWhenNoSubtitleFound(String file, FileInfo selectedFile) { if (MessageBox.Show("Pretraga po hash-u nije pronašla niti jedan rezultat za datoteku:\n\n" + selectedFile.Name + "\n\nŽelite li pretražiti po pojmu?", "Info", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { using (frmSearch frmSearch = new frmSearch(this.SubtitleClientFactory)) { frmSearch.Text = file; frmSearch.FromMain = true; frmSearch.FromMainInitialDirectory = selectedFile.Directory.ToString(); frmSearch.etTitle.Text = Path.GetFileNameWithoutExtension(selectedFile.Name); frmSearch.ShowDialog(); } } }
// hadle operations after search private void HandleSearch(frmSearch frmSub) { //ApplicationSettings.ChildFormView(this.MdiParent, ref frmSub); if (frmSub.ShowDialog() == DialogResult.OK) { FillSearchFilds(frmSub.DataRowValues); if (userLevel == DBCore.UserLevel.SystemAdmin || userLevel == DBCore.UserLevel.SystemUser_IUD) { deleteBtn.Enabled = true; addbtn.Text = "Update"; } } frmSub.Dispose(); }
private void btnVoucherToCodeSearch_Click(object sender, EventArgs e) { try { frmSearch search = new frmSearch(); search.getattributes("GetProductSearchForSemiAndFinish", null, "Products"); search.ShowDialog(); if (!string.IsNullOrEmpty(MainForm.Searched_Id)) { txtPCode.Text = MainForm.Searched_Id; MainForm.Searched_Id = string.Empty; } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void btnfomulaSearch_Click(object sender, EventArgs e) { try { frmSearch search = new frmSearch(); search.getattributes("GetProductFormulaSearch", null, "Product Formula"); search.ShowDialog(); if (!string.IsNullOrEmpty(MainForm.Searched_Id)) { txtFormulaId.Text = MainForm.Searched_Id; MainForm.Searched_Id = string.Empty; } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void btnSNo_Click(object sender, EventArgs e) { try { frmSearch search = new frmSearch(); search.getattributes("GetSearchSalesOrders", null, "Sales Orders"); search.ShowDialog(); if (!string.IsNullOrEmpty(MainForm.Searched_Id)) { txtSONo.Text = MainForm.Searched_Id; MainForm.Searched_Id = string.Empty; } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void btnSearch_Click(object sender, EventArgs e) { try { frmSearch search = new frmSearch(); search.getattributes("GetCOASearch", null, "Chart Of Accounts"); search.ShowDialog(); if (!string.IsNullOrEmpty(MainForm.Searched_Id)) { txtAccCode.Text = MainForm.Searched_Id; MainForm.Searched_Id = string.Empty; } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void btnSearch_Click(object sender, EventArgs e) { //this.lvStockGoods.Items.Add(new ListViewItem(new string[] { // (this.lvStockGoods.Items.Count + 1).ToString().PadLeft(3 ,' '), // dr["intime"].ToString().Substring(0,10), // dr["goodsname"].ToString(), // dr["stockcount"].ToString(), // dr["fixprice"].ToString()}) { Name = dr["inprice"].ToString(), Tag = dr["goodsno"].ToString() }); frmSearch s = new frmSearch(ModeType.Sell); if (s.ShowDialog(this) == DialogResult.OK) { string strSql = @"select Purchas.*,Purchas.incount-Purchas.outcount as stockcount,goodsunit.UnitName,GoodsType.TypeName,Providers.ProviderName "; strSql += "from Purchas,Providers,goodsunit,GoodsType "; strSql += "where Purchas.unitno = goodsunit.UnitNO and Providers.ProviderNO=purchas.providerno and "; strSql += "GoodsType.typeno=purchas.typeno and Purchas.incount>Purchas.outcount"; if (s.IsFuzzy) { if (s.GoodsName != string.Empty) { strSql += " and Purchas.goodsname like '%" + s.GoodsName + "%'";//recorddatetime like '" + Datetime + "%'"); } if (s.GoodsCode != string.Empty) { strSql += " and Purchas.goodscode like '%" + s.GoodsCode + "%'"; } } else { if (s.GoodsName != string.Empty) { strSql += " and Purchas.goodsname ='" + s.GoodsName + "'"; } if (s.GoodsCode != string.Empty) { strSql += " and Purchas.goodscode ='" + s.GoodsCode + "'"; } } strSql += " order by intime desc"; DataSet ds = Foundation.ReadDataSet(strSql); LoadData(ds); } }
public void Find() { try { using (frmSearch frmsrch = new frmSearch()) { frmsrch.InfSqlSelectQuery = ClsProjectSqlQuerys._IClsProjectSqlQuerys.FrmUnitSelectQuery(); frmsrch.InfSqlWhereCondtion = ""; frmsrch.InfSqlOrderBy = ""; frmsrch.InfMultiSelect = false; frmsrch.InfSearchFormName = "Search Unit Code ...."; frmsrch.InfCodeFieldName = "iId"; frmsrch.InfDescriptionFieldName = "cUnitCode"; frmsrch.InfGridFieldName = " iId ,cUnitCode ,cUnitDesc ,lUnitStatus"; frmsrch.InfGridFieldCaption = " iId, Unit Code ,Unit Description,Status"; frmsrch.InfGridFieldSize = "0,100,100,100"; frmsrch.ShowDialog(this); //txtDesgCode.Text = frmsrch.infCodeFieldText; //txtDesgName.Text = frmsrch.infDescriptionFieldText; if (frmsrch.DialogResult == DialogResult.OK) { if (frmsrch.InfCodeFieldText != null && !string.IsNullOrEmpty(frmsrch.InfCodeFieldText.Trim()) && frmsrch.InfCodeFieldText.Trim() != "") { DataView dvDesg = new DataView(); dvDesg = frmsrch.infSearchReturnDataView; dvDesg.RowFilter = "lSelect=1"; //txtDeptCode.Text = string.IsNullOrEmpty(dvDesg[0]["deptcode"].ToString()) == true ? "" : dvDesg[0]["deptcode"].ToString(); //txtDeptDesc.Text = string.IsNullOrEmpty(dvDesg[0]["deptname"].ToString()) == true ? "" : dvDesg[0]["deptname"].ToString(); if (string.IsNullOrEmpty(frmsrch.InfCodeFieldText.Trim()) == false) { int iRow = BsUnit.Find("iId", frmsrch.InfCodeFieldText.Trim()); BsUnit.Position = iRow; dvDesg.RowFilter = ""; } } } } } catch (Exception ex) { ClsMessage._IClsMessage.ProjectExceptionMessage(ex); } }
private void findButton_Click(object sender, EventArgs e) { try { using (Category sc = new Category(true)) { sc.Name = nameTextBoxX.Text; DataTable ds = sc.SelectFind(); frmSearch frmSub = new frmSearch(ds, this.Text, 1); frmSub.Width = 800; HandleSearch(frmSub); } } catch (Exception ex) { MessageView.ExceptionError(ex); } }
private void vs_CellButtonClick(object sender, C1.Win.C1FlexGrid.RowColEventArgs e) { string sql = ""; sql = "Select EMP_ID,EMP_I1,EMP_NM,DEP_ID,POS_ID,LEV_ID from FILB01A where (VAC_BT is null or VAC_BT=0) and DEP_ID in (Select DEP_ID from SYS_SECURITY_DEP" + " where MNU_ID=" + this.Tag + " and ALL_BT=1 and USER_ID=N'" + PublicFunction.A_UserID + "')"; if (vs.Rows[vs.Row]["DEP_ID"] + "" != "") { sql += " and DEP_ID=N'" + vs.Rows[vs.Row]["DEP_ID"] + "'"; } Func.RecordSet rs = new Func.RecordSet(sql, PublicFunction.C_con); frmSearch dlg = new frmSearch(rs, 3, "frmTaStaffInfo_vs"); if (dlg.ShowDialog() == DialogResult.OK) { vs.Rows[vs.Row]["EMP_ID"] = rs.record(rs.Bookmarks, "EMP_ID"); } vs.AutoSizeCols(); }
private void findButton_Click(object sender, EventArgs e) { try { using (EduQualifications edu = new EduQualifications(true)) { edu.Name = nameTextBoxX.Text; DataTable ds = edu.SelectFind(); frmSearch frmSub = new frmSearch(ds, this.Text, 1); frmSub.Width = 800; HandleSearch(frmSub); } } catch (Exception ex) { MessageView.ExceptionError(ex); } }
private void findButton_Click(object sender, EventArgs e) { try { using (OtherAddress addre = new OtherAddress(true)) { setObjectFromFieldValues(addre); DataTable ds = addre.SelectFind(); frmSearch frmSub = new frmSearch(ds, this.Text, 3, 50); frmSub.Width = 800; HandleSearch(frmSub); } } catch (Exception ex) { MessageView.ExceptionError(ex); } }
private void btnSearch_Click(object sender, EventArgs e) { try { frmSearch search = new frmSearch(); search.getattributes("GetSearchAdjustment", null, "Stock Adjustment"); search.ShowDialog(); if (!string.IsNullOrEmpty(MainForm.Searched_Id)) { txtAdjustNo.Text = MainForm.Searched_Id; MainForm.Searched_Id = string.Empty; //LoadInvoice(); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void cmd_to_Click(object sender, System.EventArgs e) { string sql = "", USER_ID = vs.Rows[vs.Row]["USER_ID"] + ""; sql = "Select 0 as SYS_SEL,EN,CH,VN,ID from SYS_MENU b where "; sql = sql + "TYP_BT=1 and SEC=1 order by EN"; Func.RecordSet rs = new Func.RecordSet(sql, PublicFunction.C_con); Basic.Form.frmSearch dlg = new frmSearch(rs, 4, "frmSecurity_vs1", true); if (dlg.ShowDialog() == DialogResult.OK) { for (int j = 1; j < dlg.vs.Rows.Count; j++) { sql = "Select TYP_ID,MNU_ID,ALL_BT from SYS_SECURITY_TYP a where MNU_ID=" + MNU_ID + " and USER_ID=N'" + USER_ID + "'"; Func.RecordSet rs1 = new Func.RecordSet(sql, PublicFunction.C_con); if (dlg.vs.Rows[j]["SYS_SEL"] + "" == "True") { sql = "insert into SYS_SECURITY_TYP(USER_ID,TYP_ID,MNU_ID,ALL_BT) "; sql += "Select N'" + USER_ID + "' as USER_ID,TYP_ID," + rs.record(j - 1, "ID") + " as MNU_ID,0 as ALL_BT" + " from FILA11A where TYP_ID not in (Select TYP_ID from SYS_SECURITY_TYP where USER_ID=N'" + USER_ID + "' and MNU_ID=" + rs.record(j - 1, "ID") + ")"; PublicFunction.SQL_Execute(sql); for (int i = 0; i < rs1.rows; i++) { if (rs1.record(i, "ALL_BT") == "True") { sql = "Update SYS_SECURITY_TYP set ALL_BT=1" + " where TYP_ID=N'" + rs1.record(i, "TYP_ID") + "' and USER_ID=N'" + USER_ID + "' and MNU_ID=" + rs.record(j - 1, "ID"); } else { sql = "Update SYS_SECURITY_TYP set ALL_BT=0" + " where TYP_ID=N'" + rs1.record(i, "TYP_ID") + "' and USER_ID=N'" + USER_ID + "' and MNU_ID=" + rs.record(j - 1, "ID"); } PublicFunction.SQL_Execute(sql); } } } } }