Esempio n. 1
0
        private void dgv_show()
        {
            dgv.Rows.Clear();
            var companyCode = companies[ComboShopName.SelectedIndex].Split(Constants.SplitChar)[0];

            if (companyCode == "")
            {
                MessageBox.Show("未定义连锁店铺,请先到连锁店铺定义!");
                return;
            }

            string errorDesc = "";
            var    comments  = ShopManagement.queryCommentByCompany(MainForm.ip, companyCode, out errorDesc);

            if (comments == null)
            {
                MessageBox.Show(errorDesc);
                return;
            }

            int i = 1;

            foreach (var comment in comments)
            {
                dgv.Rows.Add(i, comment.content, PCUtil.converJavaTimeToNetTime(comment.createTime).ToString("MM-dd HH:mm"));
                i++;
            }
        }
Esempio n. 2
0
        private void dgvUsed_show()
        {
            dgvUsed.Rows.Clear();

            string errorDesc = "";
            var    coupons   = WxCouponManagement.queryCouponRecords(LogIn.connectionIP, LogIn.options.company_Code, openId,
                                                                     DPStart.Value.ToString("yyyy-MM-dd HH:mm:ss"), DPEnd.Value.ToString("yyyy-MM-dd HH:mm:ss"), out errorDesc);

            if (coupons == null)
            {
                BathClass.printErrorMsg(errorDesc);
                return;
            }

            int i = 1;

            foreach (var coupon in coupons)
            {
                dgvUsed.Rows.Add(i, coupon.id, coupon.title, coupon.value, PCUtil.converJavaTimeToNetTime(coupon.consumeTime));
                i++;
            }

            BathClass.set_dgv_fit(dgvUsed);
            dgvUsed.CurrentCell = null;
        }
Esempio n. 3
0
        private void dgv_show()
        {
            string errorDesc = "";
            var    comments  = ShopManagement.queryCommentByCompany(LogIn.connectionIP, LogIn.options.company_Code, out errorDesc);

            if (comments == null)
            {
                BathClass.printErrorMsg(errorDesc);
                return;
            }

            int i = 1;

            foreach (var comment in comments)
            {
                dgv.Rows.Add(i, comment.content, PCUtil.converJavaTimeToNetTime(comment.createTime).ToString("MM-dd HH:mm"));
                i++;
            }
        }