public FrmMainFromNew() { // SplashScreenManager.ShowForm(this, typeof(SplashScreen1), true, true, false); if (Properties.Settings.Default.useposdata) VIRETAILDAL.COMMON.Utils.Connectionstring = Properties.Settings.Default.conmain; else VIRETAILDAL.COMMON.Utils.Connectionstring = Properties.Settings.Default.POSConnectionString; VIRETAILDAL.COMMON.Utils.ConnectionstringSync = Properties.Settings.Default.RemoteServer; //RemoteServer //AppDomain MyDomain = AppDomain.CurrentDomain; //Assembly[] AssembliesLoaded = MyDomain.GetAssemblies(); ////int i = 0; ////AssembliesLoaded.Count() //foreach (Assembly MyAssembly in AssembliesLoaded) //{ // SplashScreenManager.Default.SendCommand(SplashScreen1.SplashScreenCommand.SetProgress, MyAssembly.FullName); Thread.Sleep(100); // // } // // // Close the Splash Screen. //} // SplashScreenManager.CloseForm(false); var frm = new Login(); frm.ShowDialog(); if (!frm.LoginSucess) { Close(); } InitializeComponent(); //if (VIRETAILDAL.COMMON.Utils.UserType == 1) //{ // purchasingReportsToolStripMenuItem.Enabled = false; // purchasingToolStripMenuItem.Enabled = false; // utilitiesToolStripMenuItem.Enabled = false; // mastersToolStripMenuItem1.Enabled = false; // inventoryToolStripMenuItem.Enabled = false; //} ribbonMain.Manager.UseF10KeyForMenu = false; //if(VIRETAILDAL.COMMON.Utils.Company =="01") // barButtonItem77.Visibility = BarItemVisibility.Always; }
private void RetailSales_Load(object sender, EventArgs e) { if (VIRETAILDAL.COMMON.Utils.Userid==0) { var f = new Login(); f.ShowDialog(); if(!f.LoginSucess) Close(); } this.InvokeEx((lv => LoadDataSets())); barcomp1.Caption = VIRETAILDAL.COMMON.Utils.Company; if (ClsGetData.GetDailyClosing().Rows.Count == 0) { var frm = new InitialCash(); frm.ShowDialog(); } gridControl1.Invalidate(); _validateoff =false; repositoryItemTextEdit4.Mask.EditMask = "\\d+"; repositoryItemTextEdit4.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.RegEx; txtfileno.Properties.Mask.EditMask = "\\d+"; txtfileno.Properties.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.RegEx; txtvisitno.Properties.Mask.EditMask = "\\d+"; txtvisitno.Properties.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.RegEx; NotifyItems = new List<string>(); // dsMaster1.Merge(COMMON.ClsGetData.GetItemMastList()); LoadSessionUsers(); if (LoadHoldedInvoices()) { var bl = new BLSales(); bl.GetNonSaleInv(); if (bl.SalesmainRow != null) { txtinvoiceno.Text = bl.SalesmainRow[0].ToString(); dsInventory1.SALESINVDETAIL.Clear(); dsInventory1.Merge(bl.Salesinvdetail); foreach (DsInventory.SALESINVDETAILRow dr in dsInventory1.SALESINVDETAIL.Rows) { if (!dr.IsEXPDATENull()) dr["EXPDATE1"] = dr.EXPDATE.ToString("MM-yy"); } UpdateTotal(); } else { txtinvoiceno.Text = new BLSales().GetInvoiceNo(); DoSave(); } } }
private void RetailSales_Load(object sender, EventArgs e) { try{ if (Utils.Userid == 0) { var f = new Login(); f.ShowDialog(); if (!f.LoginSucess) Close(); } this.InvokeEx((lv => LoadDataSets())); barcomp.Caption = Utils.Company; if (ClsGetData.GetDailyClosing().Rows.Count == 0) { var frm = new InitialCash(); frm.ShowDialog(); } barButtonItem14.Caption = "Shitf Code = " + new BLSales().GetShiftCode(); // new BLSales().GetShiftCode("POINTS") gridControl1.Invalidate(); validateoff = false; //repositoryItemTextEdit4.Mask.EditMask = "\\d+"; //repositoryItemTextEdit4.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.RegEx; txtfileno.Properties.Mask.EditMask = "\\d+"; txtfileno.Properties.Mask.MaskType = MaskType.RegEx; txtvisitno.Properties.Mask.EditMask = "\\d+"; txtvisitno.Properties.Mask.MaskType = MaskType.RegEx; //txtqty.Properties.Mask.EditMask = "\\d+"; //txtvisitno.Properties.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.RegEx; NotifyItems = new List<string>(); // dsMaster1.Merge(COMMON.ClsGetData.GetItemMastList()); LoadSessionUsers(); var bl = new BLSales(); bl.GetNonSaleInv(); if (bl.Salesinvdetail != null) { if (bl.Salesinvdetail.Rows.Count > 0) { bl.DoHold(bl.SalesmainRow.SINVNO, 1, bl.SalesmainRow.CUSTOMERID, bl.SalesmainRow.CUSTNAME, bl.SalesmainRow.SDISC, bl.SalesmainRow.ROUNDOFF); } } if (LoadHoldedInvoices()) { if (bl.SalesmainRow != null) { if (!bl.SalesmainRow.IsSDISCNull()) { if(!bl.SalesmainRow.IsCUSTOMERIDNull()) { lookupcustomer.EditValue = bl.SalesmainRow.CUSTOMERID; if(!bl.SalesmainRow.IsGRADENull()) { cmbclass.EditValue = bl.SalesmainRow.GRADE; } if (!bl.SalesmainRow.IsCARDIDNull()) { txtfileno.EditValue = bl.SalesmainRow.CARDID; } if (!bl.SalesmainRow.IsCARDNONull()) { txtvisitno.EditValue = bl.SalesmainRow.CARDNO; } if (!bl.SalesmainRow.IsCUSTNAMENull()) { var sp = bl.SalesmainRow.CUSTNAME.Split('-'); if (sp.Length > 1) { txtpatname.Text = sp[1]; } } } txtdiscount.EditValue = bl.SalesmainRow.SDISC; subtotal.EditValue = bl.SalesmainRow.TOTALAMT; txtnetamt.EditValue = bl.SalesmainRow.NETAMT; } txtinvoiceno.Caption = bl.SalesmainRow[0].ToString().Trim(); dsInventory1.SALESINVDETAIL.Clear(); dsInventory1.Merge(bl.Salesinvdetail); foreach (DsInventory.SALESINVDETAILRow dr in dsInventory1.SALESINVDETAIL.Rows) { if (!dr.IsEXPDATENull()) dr["EXPDATE1"] = dr.EXPDATE.ToString("MM-yy"); } UpdateTotal(); } else { txtinvoiceno.Caption = new BLSales().GetInvoiceNo().Trim(); DoSave(); } } } catch(Exception ext) { XtraMessageBox.Show(ext.ToString(), "POS", MessageBoxButtons.OK, MessageBoxIcon.Error); } // SetUpComm(); }