コード例 #1
0
 private void Cancel()
 {
     GridView1.SelectedIndex = -1;
     TextTitle.Text          = "";
     TextTitle.Focus();
     LblHidden.ToolTip = "";
     Button1.Text      = "ثبت";
     Label3.Visible    = false;
 }
コード例 #2
0
 private void Cancel()
 {
     GridView1.SelectedIndex = -1;
     TextTitle.Text          = "";
     TextTitle.Focus();
     CheckBox1.Checked = true;
     FCKeditor1.Value  = "";
     LblHidden.ToolTip = "";
     Button1.Text      = "ثبت";
 }
コード例 #3
0
    private void Cancel()
    {
        GridView1.SelectedIndex = -1;
        TextTitle.Text          = "";
        TextBox1.Text           = "";
        FileUpload1.Dispose();

        TextTitle.Focus();
        LblHidden.ToolTip = "";
        Button1.Text      = "ثبت";
    }
コード例 #4
0
        private void BTOk_Click(object sender, EventArgs e)
        {
            string value = TextValue.Text.Trim();

            if (value == "")
            {
                BathClass.printErrorMsg("需要输入金额");
                TextValue.SelectAll();
                return;
            }

            string title = TextTitle.Text.Trim();

            if (title == "")
            {
                BathClass.printErrorMsg("需要输入优惠券名称!");
                return;
            }

            string errorDesc = "";

            if (wxCoupon == null)
            {
                bool success = WxCouponManagement.uploadCoupon(LogIn.connectionIP, 0, LogIn.options.company_Code,
                                                               MConvert <double> .ToTypeOrDefault(value, 0), TextDescp.Text, title, "n", out errorDesc);
                if (!success)
                {
                    BathClass.printErrorMsg("上传失败,原因:" + errorDesc);
                    return;
                }

                this.form.dgv_show();
                TextTitle.Text = "";
                TextValue.Text = "";
                TextDescp.Text = "";
                TextTitle.Focus();
            }
            else
            {
                bool success = WxCouponManagement.uploadCoupon(LogIn.connectionIP, wxCoupon.id, LogIn.options.company_Code,
                                                               MConvert <double> .ToTypeOrDefault(value, 0), TextDescp.Text, title, "n", out errorDesc);
                if (!success)
                {
                    BathClass.printErrorMsg("上传失败,原因:" + errorDesc);
                    return;
                }

                this.DialogResult = DialogResult.OK;
                this.Close();
            }
        }
コード例 #5
0
        private void searchBoxInText_TextChanged(object sender, TextChangedEventArgs e)
        {
            Regex           regex   = new Regex(searchBoxInText.Text, RegexOptions.IgnoreCase);
            string          str     = TextTitle.Text;
            MatchCollection matches = regex.Matches(str);

            if (matches.Count > 0)
            {
                foreach (Match match in matches)
                {
                    TextTitle.SelectionStart  = match.Index;
                    TextTitle.SelectionLength = searchBoxInText.Text.Length;
                    TextTitle.Focus();
                }
            }
            searchBoxInText.Focus();
        }
コード例 #6
0
 private void Cancel()
 {
     Fill();
     TextTitle.Focus();
 }
コード例 #7
0
    protected void ImageButton5_Click(object sender, ImageClickEventArgs e)
    {
        decimal id_user;
        string  user_name;

        if (Request.Cookies["Login_User"] == null)
        {
            Label30.Visible = true;
            Login1.Visible  = true;
            TextTitle.Focus();
        }
        else
        {
            Label30.Visible = false;
            id_user         = decimal.Parse(Request.Cookies["Id_User"].Value);
            user_name       = Request.Cookies["Family_User"].Value;

            user      ac = new user();
            userDatum dm = new userDatum();
            dm.Id = id_user;
            DataTable dt = ac.select_one_user(dm);
            user_name = dt.Rows[0]["name"].ToString() + " " + dt.Rows[0]["family"].ToString();



            //-----------------------------------------------------------------------------------------------//
            Shoping      ac2 = new Shoping();
            ShopingDatum dm2 = new ShopingDatum();

            PublicClass pc = new PublicClass();

            dm2.Id_User       = id_user;
            dm2.Register_Date = pc.GetDate();
            Random rnd    = new Random();
            string f_code = null;
            for (int j = 0; j < 16; j++)
            {
                f_code = f_code + rnd.Next(0, 9).ToString();
            }
            dm2.Factor_Code      = f_code;
            dm2.Tasx             = decimal.Parse(Label33.Text);
            dm2.Send_Price       = decimal.Parse(Label19.Text);
            dm2.Sum_Price        = decimal.Parse(Label22.Text);
            dm2.Factor_Condition = "در تاریخ " + pc.GetDate() + " سفارش ثبت شد";
            dm2.Customer_Name    = user_name;

            decimal id_factor = ac2.Insert_Factor(dm2);

            dm2.Id_Factor = id_factor;

            for (int i = 0; i < GridView1.Rows.Count; i++)
            {
                dm2.Count      = int.Parse(((DropDownList)(GridView1.Rows[i].FindControl("DropDownList1"))).SelectedValue);
                dm2.Id_Product = decimal.Parse(((Label)(GridView1.Rows[i].FindControl("lblid"))).Text);

                ac2.Insert_Factor_Details(dm2);
                update_number_shop(decimal.Parse(((Label)(GridView1.Rows[i].FindControl("lblid"))).Text), int.Parse(((DropDownList)(GridView1.Rows[i].FindControl("DropDownList1"))).SelectedValue));
            }
            Session["ProductTable"] = null;
            Response.Redirect("~/index.aspx?Type=ShopPeymentRegister&Factor_Code=" + f_code + "&Id_Factor=" + id_factor + "&Sum_Price=" + decimal.Parse(Label22.Text));
        }
    }