Exemplo n.º 1
0
 private void FormSms_Load(object sender, EventArgs e)
 {
     dtSearch.Text = Practical.Today_Date();
     comRemeberBirthDay.SelectedIndex = 0;
     try
     {
         using (var context = new StimulsoftEntities())
         {
             var set = context.Setting.FirstOrDefault();
             if (set != null)
             {
                 txtSignature.Text = set.Signature;
                 txtSMSnumber.Text = set.NumberSms;
             }
             else
             {
                 MessageBox.Show("از بخش تنظیمات امضا و شماره پیامک را وارد کنید", "هشدار", MessageBoxButtons.OK, MessageBoxIcon.Warning);
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Exemplo n.º 2
0
 //**************
 private void FormReports_Load(object sender, EventArgs e)
 {
     //------
     using (var context = new StimulsoftEntities())
     {
         if (PanelUser.Visible == true) // amade kardane panel user baraye gozaresh bar asase moshtari
         {
             var      select   = context.Service.ToList();
             string[] eshterak = new string[select.Count];
             for (int i = 0; i < select.Count; i++)
             {
                 eshterak[i] = select[i].Eshterak.ToString();
             }
             AutoCompleteStringCollection suggestEshterak = new AutoCompleteStringCollection();
             txtEshterak.AutoCompleteCustomSource = suggestEshterak;
             suggestEshterak.AddRange(eshterak);
             //-------
             string[] phone = new string[select.Count];
             for (int i = 0; i < select.Count; i++)
             {
                 phone[i] = select[i].Mobile.ToString();
             }
             AutoCompleteStringCollection suggestPhone = new AutoCompleteStringCollection();
             txtPhone.AutoCompleteCustomSource = suggestPhone;
             suggestPhone.AddRange(phone);
         }
         if (panelProdoct.Visible == true)// amade kardane panel prodoct baraye gozaresh bar asase mahsool
         {
             panelProdoct.BringToFront();
             var category = context.Category.ToList();
             if (category.Count > 0)
             {
                 comCategory.DataSource    = category;
                 comCategory.DisplayMember = "Name";
             }
             //---------
             var prodoct = context.Prodoct.Where(c => c.NameService == comCategory.Text).ToList();
             comProdoct.DataSource    = prodoct;
             comProdoct.DisplayMember = "Name";
             //----------
             dtStart1.Text = Practical.Today_Date();
             dtEnd1.Text   = Practical.Today_Date();
             //----------
             label4.Text              = "تعداد:";
             label7.Visible           = false;
             label9.Visible           = false;
             lblTotalMande.Visible    = false;
             lblTotallTakhfif.Visible = false;
         }
     }
     //-----------
     if (PanelDate.Visible == true) // amade kardane panel date baraye gozaresh bar asase zaman
     {
         dtStart.Today_Click(null, null);
         dtEnd.Today_Click(null, null);
     }
     //------
 }
Exemplo n.º 3
0
        private void FormSearch_Load(object sender, EventArgs e)
        {
            dtSearch.Text           = Practical.Today_Date();
            comSearch.SelectedIndex = 0;
            dtSearch.Visible        = true;

            //*****************

            //lblError.Location = new System.Drawing.Point(456, 430);
            //-----
        }
Exemplo n.º 4
0
        private void FormReportAnbar_Load(object sender, EventArgs e)
        {
            DateFirst.Text = Practical.Today_Date();
            DateEnd.Text   = Practical.Today_Date();
            StimulsoftEntities context = new StimulsoftEntities();

            if (context.AnbarProdoct.Count() > 0)
            {
                var prodocts = context.AnbarProdoct.ToList();
                comProdoct.DataSource    = prodocts;
                comProdoct.DisplayMember = "Name";
                Refresh_dgSearch();
            }
        }
Exemplo n.º 5
0
 private void FormAnbar_Load(object sender, EventArgs e)
 {
     Date.Text             = Practical.Today_Date();
     dateExpird.Text       = Practical.Today_Date();
     comCase.SelectedIndex = 0;
     //dgAnbar.Enabled = false;
     groupProdoct.Enabled = false;
     //dateExpird.Text = Practical.Today_Date();
     dateExpird.ForeColor = Color.DarkGray;
     //dateExpird.Text = "تاریخ انقضا";
     Refresh_dgProdoct();
     Refresh_dgStore();
     dgProdoct.ClearSelection();
     dgStore.ClearSelection();
 }
Exemplo n.º 6
0
 private void MainForm_Load(object sender, EventArgs e)
 {
     dateEnter.Text = Practical.Today_Date();
     //dateBirthDay.Text = Practical.Today_Date();
 }
Exemplo n.º 7
0
 private void FormBirthDay_Load(object sender, EventArgs e)
 {
     dtBirthDay.Text = Practical.Today_Date();
     comRemeberBirthDay.SelectedIndex = 0;
 }