/// <summary> /// 守灵厅办理 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void barButtonItem2_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_business01 frm_slt = new Frm_business01(); frm_slt.swapdata["dataset"] = this.business_ds; frm_slt.swapdata["AC001"] = AC001; frm_slt.swapdata["SALESTYPE"] = "0"; //火化业务 if (frm_slt.ShowDialog() == DialogResult.OK) { RefreshSalesData(); } frm_slt.Dispose(); }
private void barButtonItem12_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { Frm_business01 frm_1 = new Frm_business01(); 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"] = "01"; //类型:守灵厅 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(); }
/// <summary> /// 守灵厅办理 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void BarButtonItem2_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { if (FireAction.FireIsSettled(AC001) == "1") { MessageBox.Show("已经办理火化且结算完成,不能继续办理业务!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } //检查是否已有 if (gridView1.LocateByValue("SA002", "01") >= 0 || gridView1.LocateByValue("SA002", "02") >= 0) { MessageBox.Show("已经办理守灵或冷藏业务!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } Frm_business01 frm_slt = new Frm_business01(); frm_slt.swapdata["dataset"] = this.sa01_ds; frm_slt.swapdata["AC001"] = AC001; if (frm_slt.ShowDialog() == DialogResult.OK) { RefreshSalesData(); } }