public static string Get_QyInfo(string info_item) { string info = ""; BLL.Xqyxx B_Xqyxx = new Hotel_app.BLL.Xqyxx(); List <Model.Xqyxx> lists = B_Xqyxx.GetModelList(""); if (lists.Count > 0) { Model.Xqyxx M_Xqyxx = lists[0]; if (info_item == "qymc") { info = M_Xqyxx.qymc; } if (info_item == "yydh") { info = M_Xqyxx.yydh; } if (info_item == "qybh") { info = M_Xqyxx.qybh; } } else { info = "000000"; } return(info); }
//打印公共信息 public static void GetPrintInfo(ref string qymc, ref string qymc_english, ref string Address_chinese, ref string Address_english, ref string qydh, ref string qycz, ref string qyyb, ref string website) { BLL.Xqyxx B_Xqyxx = new Hotel_app.BLL.Xqyxx(); List <Model.Xqyxx> lists = B_Xqyxx.GetModelList(""); if (lists.Count > 0) { Model.Xqyxx M_Xqyxx = lists[0]; qymc = M_Xqyxx.qymc; qymc_english = M_Xqyxx.qydzyw; Address_chinese = M_Xqyxx.qydz; Address_english = M_Xqyxx.qydzyw; qydh = M_Xqyxx.qydh; qycz = M_Xqyxx.qycz; qyyb = "361000"; website = M_Xqyxx.wz; } else { qymc = ""; qymc_english = ""; Address_chinese = ""; Address_english = ""; qydh = ""; qycz = ""; qyyb = ""; website = ""; } }
private void btn_save(object sender, EventArgs e) { DevExpress.XtraEditors.SimpleButton simpbtn = (DevExpress.XtraEditors.SimpleButton)sender; if (simpbtn.Tag.Equals("Simbtn_save_basic")) { if (!txt_jdmc.Text.Equals(common_file.common_app.qymc) || !txt_yydh.Text.Equals(common_file.common_app.yydh) || !txt_SoftName.Text.Equals(common_file.common_app.SoftName)) { common_file.common_app.get_czsj(); Model.Xqyxx qyxx = new Hotel_app.Model.Xqyxx(); BLL.Xqyxx bll = new Hotel_app.BLL.Xqyxx(); List <Model.Xqyxx> list = bll.GetModelList(" id>=0 and yydh='" + common_file.common_app.yydh + "'"); if (list != null && list.Count > 0) { qyxx = list[0]; int id = qyxx.id; qyxx.qymc = txt_jdmc.Text; qyxx.yydh = txt_yydh.Text; qyxx.Softname = txt_SoftName.Text; qyxx.id = id; if (bll.Update(qyxx)) { common_file.common_app.Message_box_show(common_file.common_app.message_title, "更新酒店基本信息成功"); } } } } if (simpbtn.Tag.Equals("Simbtn_save_zdInfo")) { if (!cb_jzd.SelectedItem.Equals(jzd_now) || !cb_yjd.SelectedItem.Equals(yjd_now) || !cb_djb.SelectedItem.Equals(djb_now) || !txt_yqsts.Value.Equals(tqts)) { jzd_now = cb_jzd.Text.Equals("A4") ? "11" : "21"; yjd_now = cb_yjd.Text.Equals("A4") ? "11" : "21"; djb_now = cb_djb.Text.Equals("A4") ? "11" : "21"; BLL.Qcounter bll = new Hotel_app.BLL.Qcounter(); Model.Qcounter counter = new Hotel_app.Model.Qcounter(); List <Model.Qcounter> list = bll.GetModelList(" id>=0 and yydh='" + common_file.common_app.yydh + "'"); if (list != null && list.Count > 0) { counter = list[0]; int id = counter.ID; counter.printzdpd = int.Parse(jzd_now + yjd_now + djb_now); counter.ID = id; if (bll.Update(counter)) { common_file.common_app.Message_box_show(common_file.common_app.message_title, "更新成功,你现在可以直接连接打印机打印您设置的账单"); } } } } }