private void JWeightForm_Load(object sender, EventArgs e) { try { lblUserName.Text = JMainFrame.CurrentUser.Person.Name + " " + JMainFrame.CurrentUser.Person.Fam; //if (Globals.JRegistry.Read("BascolNum") != null) //{ lblBascolNum.Text = JReport.GetBascoolNumber().ToString(); // Globals.JRegistry.Read("BascolNum").ToString(); _Type = JReport.GetBascoolType(); //_bascoolCapacity = Convert.ToInt32(JReport.GetBascols(Convert.ToInt32(lblBascolNum.Text)).Rows[0]["Capacity"]); //} txtPlak1.Focus(); FillTruck(); if (this.State == JFormState.Insert) { //txtTime.Text = DateTime.Now.ToLongTimeString(); string Min = ""; if (DateTime.Now.Minute.ToString().Length == 1) { Min = "0" + DateTime.Now.Minute.ToString(); } else { Min = DateTime.Now.Minute.ToString(); } string Hour = ""; if (DateTime.Now.Hour.ToString().Length == 1) { Hour = "0" + DateTime.Now.Hour.ToString(); } else { Hour = DateTime.Now.Hour.ToString(); } lblTime.Text = Hour + ":" + Min; //txtDate.Date = DateTime.Now;// Convert.ToDateTime(Globals.JRegistry.Read("DateExternalResturant")); lblDate.Text = JDateTime.FarsiDate(DateTime.Now); lblDay.Text = JLanguages._Text(DateTime.Now.DayOfWeek.ToString()); } else { SetForm(); } GetTaxDuty(); InitComPort(); cmbProduct.SelectedIndex = 1; //lsTrucks.SelectedIndex = 1; //lsTrucks.SelectedIndex = 0; cmbPlak.SelectedIndex = 20; txtPlak1.Focus(); } catch (Exception ex) { JSystem.Except.AddException(ex); } }
private void JConfigBascolForm_Load(object sender, EventArgs e) { cmbBascol.DataSource = JReport.GetBascols(0); cmbBascol.DisplayMember = "Code"; cmbBascol.ValueMember = "Code"; cmbBascol.SelectedValue = JReport.GetBascoolNumber(); cmbBascolType.SelectedIndex = JReport.GetBascoolType(); //if (Globals.JRegistry.Read("BascolNum") != null) // cmbBascol.SelectedValue = Convert.ToInt32(Globals.JRegistry.Read("BascolNum")); //if (Globals.JRegistry.Read("BascolType") != null) // cmbBascolType.Text = Globals.JRegistry.Read("BascolType").ToString(); }