Пример #1
0
 private void newCusMsg1_Click(object sender, EventArgs e)
 {
     try
     {
         BLL.ICustomer cbll        = new BLL.Customer();
         var           cus         = new body.customer();
         int           un_read_num = 0;
         if (cbll.GetFirstNewCustomer(out cus, out un_read_num) == true)
         {
             var frm = new customer.frmCusHand(cus, "新客户审核", un_read_num);
             frm.ShowDialog();
         }
         else
         {
             throw new Exception("不存在未阅读的货商信息");
         }
     }
     catch (Exception ex)
     {
         Program.frmMsg(ex.Message);
     }
 }
Пример #2
0
        public SetGroupCls()
        {
            InitializeComponent();
            GlobalData.InitForm(this);
            LoadDataGrid();


            BLL.ICustomer         bll2    = new BLL.Customer();
            List <body.key_value> all_lst = new List <body.key_value>();

            all_lst.Add(new body.key_value {
                t_key = "", t_value = "请选择客户组"
            });
            var lst2 = bll2.GetCusGroupList();

            if (lst2.Count > 0)
            {
                all_lst.AddRange(lst2);
            }
            comboBox1.DataSource = all_lst;

            BLL.IGoodsCls bll = new BLL.GoodsCls();
            dt = bll.GetDtForSupCustGroup();
        }
Пример #3
0
 private void refreshData(DataTable lines)
 {
     try
     {
         BLL.ICustomer cbll   = new BLL.Customer();
         decimal       credit = 0;
         if (ord.cus_no != null && ord.cus_no != "")
         {
             decimal bal   = 0;
             decimal c_amt = 0;
             cbll.GetBalance(ord.cus_no, out bal, out c_amt);
             credit = bal + c_amt;
         }
         lbl_credit_amt.Text = credit.ToString("F2");
         lbl单号.Text          = ord.ord_id;
         lbl下单时间.Text        = Conv.ToDateTime(ord.create_time).ToString("yyyy-MM-dd HH:mm");
         lbl送达时间.Text        = ord.reach_time;
         lbl姓名.Text          = ord.sname;
         lbl手机.Text          = ord.mobile;
         lbl地址.Text          = ord.address;
         lbl备注.Text          = ord.cus_remark;
         //计算合计
         decimal amount = 0;
         foreach (DataRow line in lines.Rows)
         {
             if (line["enable"].ToString() == "1")
             {
                 amount += Conv.ToDecimal(line["amount"]);
             }
         }
         lab优惠.Text = "优惠金额:¥" + ord.discount_amt.ToString("F2");
         lbl合计.Text = "¥" + (amount - ord.discount_amt + ord.take_fee).ToString("0.##");
         //支付类型
         if (ord.pay_type == "0" || ord.pay_type.Equals("2"))
         {
             pnl付款.BackgroundImage = pictureBox2.Image;
             lab配送.Text            = "配送费:¥" + ord.take_fee.ToString("F2");
         }
         else if (ord.pay_type == "1")
         {
             pnl付款.BackgroundImage = pictureBox1.Image;
             lab配送.Text            = "配送费:¥" + ord.take_fee.ToString("F2");
         }
         //展示处理按键
         if (ord.status == "0")
         {
             pnl_pass.Visible    = true;
             pnl_disable.Visible = true;
         }
         else
         {
             pnl_pass.Visible    = false;
             pnl_disable.Visible = false;
         }
         //
         index = 0;
         this.DisplayLines(lines);
     }
     catch (Exception e)
     {
         Program.frmMsg(e.Message);
     }
 }