Beispiel #1
0
        /// <summary>
        /// 新增 冷藏
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void barButtonItem13_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            Frm_business02 frm_1 = new Frm_business02();

            frm_1.swapdata["dataset"]   = business_ds;
            frm_1.swapdata["SALESTYPE"] = "1";

            DialogResult result = frm_1.ShowDialog();

            if (result == DialogResult.OK)
            {
                string  s_itemId = frm_1.swapdata["ITEMID"].ToString();
                DataRow dr       = business_ds.Sa01.Rows.Add();
                dr["SA003"] = MiscAction.GetItemFullName(s_itemId);
                dr["SA002"] = "02";                                                                                  //类型:冷藏柜
                dr["SA004"] = s_itemId;
                dr["PRICE"] = MiscAction.GetItemFixPrice(s_itemId);                                                  //单价
                dr["SA005"] = "1";                                                                                   //临时性销售
                dr["NUMS"]  = Convert.ToDecimal(frm_1.swapdata["NUMS"]);                                             //数量
                dr["SA007"] = Convert.ToDecimal(dr["PRICE"]) * Convert.ToDecimal(dr["NUMS"]);                        //金额
                dr["SA020"] = "F";

                dr.EndEdit();
            }
            frm_1.Dispose();
            this.CalcSum();
        }
Beispiel #2
0
        /// <summary>
        /// 冷藏办理
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void barButtonItem3_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (FireAction.FireIsSettled(AC001) == "1")
            {
                XtraMessageBox.Show("已经办理火化且结算完成,不能继续办理业务!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }

            //检查是否已有
            if (gridView1.LocateByValue("SA002", "01") >= 0 || gridView1.LocateByValue("SA002", "02") >= 0)
            {
                if (XtraMessageBox.Show("已经办理守灵或冷藏业务!确认要继续?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
                {
                    return;
                }
            }

            Frm_business02 frm_lcg = new Frm_business02();

            frm_lcg.swapdata["dataset"]   = business_ds;
            frm_lcg.swapdata["AC001"]     = AC001;
            frm_lcg.swapdata["SALESTYPE"] = "0";

            if (frm_lcg.ShowDialog() == DialogResult.OK)
            {
                RefreshSalesData();
            }
            frm_lcg.Dispose();
        }