Example #1
0
    public void Login()
    {
        string encryp    = FormsAuthentication.HashPasswordForStoringInConfigFile(TxtPassword.Text, "SHA1");
        Object UserLogin = new Object();

        UserLogin.Mobile   = TxtMobile.Text;
        UserLogin.Password = encryp;
        DataTable dt = BSLAYER.LoginUser(UserLogin);
        int       r  = dt.Rows.Count;

        if (r < 1)
        {
            Lbllogmsg.Visible = true;
            TxtMobile.Text    = "";
            TxtPassword.Text  = "";
            TxtMobile.Focus();
            TxtMobile.BorderColor = System.Drawing.Color.Red;
        }
        else
        {
            Lbllogmsg.Visible   = false;
            Session["Loggedin"] = "1";
            Session["Name"]     = dt.Rows[0]["Name"].ToString();
            Session["Mail"]     = dt.Rows[0]["Email"].ToString();
            Session["Mobile"]   = dt.Rows[0]["Mobile"].ToString();
            Session["Address"]  = dt.Rows[0]["Address"].ToString();
            Session["Pin"]      = dt.Rows[0]["Pincode"].ToString();
            Response.Redirect("account");
        }
    }
 private void TxtFullName_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (e.KeyChar == 13) // 엔터
     {
         TxtMobile.Focus();
     }
 }
Example #3
0
 private void TxtFullName_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (e.KeyChar == 13)  // 13은 엔터, 엔터치면 밑 텍스트박스에 포커싱
     {
         TxtMobile.Focus();
     }
 }
Example #4
0
    protected void TxtDirectName_TextChanged(object sender, EventArgs e)
    {
        try
        {
            string   CUNAME  = TxtDirectName.Text;
            string[] custnob = CUNAME.Split('_');

            if (custnob.Length > 1)
            {
                TxtDirectName.Text = custnob[0].ToString();
                TxtDirectNo.Text   = (string.IsNullOrEmpty(custnob[1].ToString()) ? "" : custnob[1].ToString());
                TxtMobile.Text     = AVS5038.getmobile(TxtDirectNo.Text);
                DT = CD.GetStage(TxtDirectNo.Text);

                if (DT.Rows[0]["STAGE"].ToString() == "1001")
                {
                    WebMsgBox.Show("Customer Not Authoried...!!", this.Page);
                    return;
                }
                else if (DT.Rows[0]["STAGE"].ToString() == "1004")
                {
                    WebMsgBox.Show("Customer is Deleted...!!", this.Page);
                    return;
                }
            }
            TxtMobile.Focus();
        }
        catch (Exception ex)
        {
            ExceptionLogging.SendErrorToText(ex);
        }
    }
Example #5
0
        private void InitControls()
        {
            TxtIdx.Clear();
            TxtNames.Clear();
            TxtAddr.Clear();
            TxtMobile.Clear();
            TxtEmail.Clear();
            CboLevels.SelectedIndex = 0;

            TxtIdx.Focus();

            baseMode = BaseMode.NONE;

            #region comboBox Dictionary

            /*Dictionary<string, string> dic = new Dictionary<string, string>
             * {
             *  { "선택", "00" },
             *  { "서울특별시", "11" },
             *  { "부산광역시", "21" },
             *  { "대구광역시", "22" },
             *  { "인천광역시", "23" },
             *  { "광주광역시", "24" },
             *  { "대전광역시", "25" }
             * };
             *
             * CboDivision.DataSource = new BindingSource(dic, null);
             * CboDivision.DisplayMember = "Key";
             * CboDivision.ValueMember = "Value";*/
            #endregion
        }
Example #6
0
        // Kontragent məlumatlarının yenilənməsi:
        private void BtnUpdate_Click(object sender, RoutedEventArgs e)
        {
            if (string.IsNullOrWhiteSpace(TxtCounterpartyName.Text))
            {
                TxtCounterpartyName.BorderBrush     = Brushes.Red;
                TxtCounterpartyName.BorderThickness = new Thickness(2);
            }
            if (string.IsNullOrWhiteSpace(TxtResponsiblePerson.Text))
            {
                TxtResponsiblePerson.BorderBrush     = Brushes.Red;
                TxtResponsiblePerson.BorderThickness = new Thickness(2);
            }
            if (string.IsNullOrWhiteSpace(TxtPhone.Text))
            {
                TxtPhone.BorderBrush     = Brushes.Red;
                TxtPhone.BorderThickness = new Thickness(2);
            }
            if (string.IsNullOrWhiteSpace(TxtAddress.Text))
            {
                TxtAddress.BorderBrush     = Brushes.Red;
                TxtAddress.BorderThickness = new Thickness(2);
            }
            if (string.IsNullOrWhiteSpace(TxtCounterpartyName.Text) ||
                string.IsNullOrWhiteSpace(TxtResponsiblePerson.Text) ||
                string.IsNullOrWhiteSpace(TxtPhone.Text) ||
                string.IsNullOrWhiteSpace(TxtAddress.Text))
            {
                TxtBlcAttention.Text = "Qırmızı sahələr doldurulmalıdır";
                return;
            }
            if (CmbPosition.SelectedItem == null)
            {
                MessageBox.Show("Vəzifə seçin");
                return;
            }
            TxtBlcAttention.Text = "";
            if (db.Counterparties.Count(c => c.Phone == TxtPhone.Text) > 0 && TxtPhone.Text != selectedCounterparty.Phone)
            {
                TxtBlcAttention.Text = "Bu telefon nömrəsi artıq qeyd olunub";
                TxtPhone.Focus();
                return;
            }
            if (db.Counterparties.Count(c => c.Mobile == TxtMobile.Text) > 0 && TxtMobile.Text != selectedCounterparty.Mobile)
            {
                TxtBlcAttention.Text = "Bu telefon nömrəsi artıq qeyd olunub";
                TxtMobile.Focus();
                return;
            }
            Counterparty counterparty = db.Counterparties.Find(selectedCounterparty.Id);

            counterparty.Name = TxtCounterpartyName.Text;
            counterparty.ResponsiblePerson = TxtResponsiblePerson.Text;
            counterparty.PositionID        = db.Positions.First(p => p.Name == CmbPosition.SelectedValue.ToString()).Id;
            counterparty.Phone             = TxtPhone.Text;
            counterparty.Mobile            = TxtMobile.Text;
            counterparty.Address           = TxtAddress.Text;
            db.SaveChanges();
            TxtBlcAttention.Text = "Kontragent yeniləndi";
            crmWindow.Refresh();
        }
Example #7
0
 protected void BtnLogin_Click(object sender, EventArgs e)
 {
     if ((TxtMobile.Text == "") && (TxtPassword.Text == ""))
     {
         TxtMobile.BorderColor   = System.Drawing.Color.Red;
         TxtPassword.BorderColor = System.Drawing.Color.Red;
         TxtMobile.Focus();
     }
     else
     {
         Login();
     }
 }
Example #8
0
 protected void TxtDirectNo_TextChanged(object sender, EventArgs e)
 {
     try
     {
         DT = CD.GetCustName(TxtDirectNo.Text);//ankita 22/11/2017 brcd removed
         TxtDirectName.Text = DT.Rows[0]["CUSTNAME"].ToString();
         TxtMobile.Text     = AVS5038.getmobile(TxtDirectNo.Text);
         TxtMobile.Focus();
     }
     catch (Exception ex)
     {
         ExceptionLogging.SendErrorToText(ex);
     }
 }
Example #9
0
    public void Login()
    {
        string encryp    = FormsAuthentication.HashPasswordForStoringInConfigFile(TxtPassword.Text, "SHA1");
        Object UserLogin = new Object();

        UserLogin.Mobile   = TxtMobile.Text;
        UserLogin.Password = encryp;
        DataTable dt = BSLAYER.LoginUser(UserLogin);
        int       r  = dt.Rows.Count;

        if (r < 1)
        {
            Lbllogmsg.Visible = true;
            TxtMobile.Text    = "";
            TxtPassword.Text  = "";
            TxtMobile.Focus();
            TxtMobile.BorderColor = System.Drawing.Color.Red;
        }
        else
        {
            Lbllogmsg.Visible  = false;
            Session["OrderNo"] = LblOdId.Text;
            Session["Total"]   = PurchaseAmnt.Value;
            Session["Name"]    = dt.Rows[0]["Name"].ToString();
            Session["Mail"]    = dt.Rows[0]["Email"].ToString();
            Session["Mobile"]  = dt.Rows[0]["Mobile"].ToString();
            Session["Address"] = dt.Rows[0]["Address"].ToString();
            Session["Pin"]     = dt.Rows[0]["Pincode"].ToString();
            Response.Redirect("transaction");
            generatetran();
            //BtnOrder.Visible = true;
            TxtMobile.Visible   = false;
            TxtPassword.Visible = false;
            BtnLogin.Visible    = false;
        }
    }
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     TxtMobile.Focus();
 }