示例#1
0
        public ReturnResult <Province> GetAllProvinceSearched(BaseCondition <Province> condition)
        {
            ProvinceDAL provinceDAL = new ProvinceDAL();
            var         result      = provinceDAL.GetAllProvinceSearched(condition);

            return(result);
        }
 public Province_City_CarBLL()
 {
     pd  = new ProvinceDAL();
     cd  = new CityDAL();
     cbd = new CarBrandDAL();
     csd = new CarSystemDAL();
     ctd = new CarTypeDAL();
 }
        private void LoadProvince()
        {
            ProvinceDAL provinceDAL = new ProvinceDAL();

            ddlProvince.DataSource     = provinceDAL.SelectAll();
            ddlProvince.DataTextField  = "dName";
            ddlProvince.DataValueField = "dName";
            ddlProvince.DataBind();
        }
示例#4
0
        //GET: NewCustomer
        public ActionResult Add()
        {
            ViewBag.listProvince = new SelectList(ProvinceDAL.GetData(), "ID", "ProvinceName");
            ViewBag.listRegion   = new SelectList(String.Empty, "", "");
            ViewBag.listDistrict = new SelectList(String.Empty, "", "");
            CustomersViewModel model = new CustomersViewModel();

            return(PartialView("Add", model));
        }
示例#5
0
        // ini diguunakan untuk edit

        public ActionResult Edit(int Id)
        {
            SuppliersViewModel model = SuppliersDAL.GetDataByID(Id);

            ViewBag.ListProvince = new SelectList(ProvinceDAL.GetData(), "ID", "ProvinceName");
            ViewBag.ListRegion   = new SelectList(string.Empty, "", "");
            ViewBag.ListDistrict = new SelectList(string.Empty, "", "");

            return(PartialView("Edit", model));
        }
示例#6
0
 public ProvinceController()
 {
     provinceDAL = new ProvinceDAL(DbProvider);
 }
示例#7
0
文件: frmMain.cs 项目: wpmyj/HS-M60
        private void frmMain_Load(object sender, EventArgs e)
        {
            //分辨率
            //int i=Win32.GetSystemMetrics(0);
            //int y = Win32.GetSystemMetrics(1);

            //Console.WriteLine(i.ToString() + "|" + y.ToString());

            try
            {
                string msg;

                if (!BaseDAL.Open(PubGlobal.LocalDbConnection, out msg))
                {
                    MessageBox.Show("本地数据库打开失败。" + msg);
                }
                if (!ProvinceDAL.LoadProvince(out PubGlobal.ProvinceMap, out msg))
                {//读取省份
                    MessageBox.Show("省份读取错误:" + msg);
                }
                #region 读取本地参数

                StreamReader Sr = new StreamReader(PubGlobal.ConfigPath);

                while (!Sr.EndOfStream)
                {
                    string s = Sr.ReadLine();

                    if (string.IsNullOrEmpty(s))
                    {
                        continue;
                    }
                    else
                    {
                        string[] ss = s.Split('=');
                        switch (ss[0])
                        {
                        case "PosNo":
                            PubGlobal.PosNo = ss[1];
                            break;

                        case "ExeFilePath_Bank":
                            PubGlobal.ExeFilePath_Bank = ss[1];
                            break;

                        case "InFilePath_Bank":
                            PubGlobal.InFilePath_Bank = ss[1];
                            break;

                        case "OutFilePath_Bank":
                            PubGlobal.OutFilePath_Bank = ss[1];
                            break;

                        case "ExeFilePath_Vip":
                            PubGlobal.ExeFilePath_Vip = ss[1];
                            break;

                        case "InFilePath_Vip":
                            PubGlobal.InFilePath_Vip = ss[1];
                            break;

                        case "OutFilePath_Vip":
                            PubGlobal.OutFilePath_Vip = ss[1];
                            break;

                        case "WSURL":
                            Comm.Comm.URL = ss[1];
                            break;

                        case "ScanMode":
                            PubGlobal.ScanMode = int.Parse(ss[1]);
                            break;

                        case "OrgCode":
                            PubGlobal.OrgCode = ss[1];
                            break;

                        case "BillHead":
                            PubGlobal.BillHead = ss[1];
                            break;

                        case "BillFoot1":
                            PubGlobal.BillFoot1 = ss[1];
                            break;

                        case "BillFoot2":
                            PubGlobal.BillFoot2 = ss[1];
                            break;

                        case "BillFoot3":
                            PubGlobal.BillFoot3 = ss[1];
                            break;

                        case "DefaultProvince":
                            foreach (string key in PubGlobal.ProvinceMap.Keys)
                            {
                                if (PubGlobal.ProvinceMap[key].Equals(ss[1]))
                                {
                                    PubGlobal.DefaultProvince = key;
                                    break;
                                }
                            }
                            break;

                        default:
                            continue;
                        }
                    }
                }
                Sr.Close();
                #endregion

                cEmvpbocBank.ExeFilePath     = PubGlobal.ExeFilePath_Bank;
                cEmvpbocBank.InDataFilePath  = PubGlobal.InFilePath_Bank;
                cEmvpbocBank.OutDataFilePath = PubGlobal.OutFilePath_Bank;

                cEmvpbocVip.ExeFilePath     = PubGlobal.ExeFilePath_Vip;
                cEmvpbocVip.InDataFilePath  = PubGlobal.InFilePath_Vip;
                cEmvpbocVip.OutDataFilePath = PubGlobal.OutFilePath_Vip;
                GC.Collect();
            }
            catch (Exception ex)
            {
                MessageBox.Show("系统参数错误!", ex.Message, MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1);
            }
            try
            {
                ////初始化打印机
                //if (!Printer.Init(0, 0, 24, 24, 0))
                //{
                //    MessageBox.Show("打印机初始化失败");
                //}
                ////初始化扫描头
                //Scanner.Init(PubGlobal.ScanMode);
                //Scanner.Open();
                ////初始化侧键
                //SideBtn.Init();
                ////初始化蜂鸣器
                //Buzzer.Init();
                //if (!Buzzer.Open())
                //{
                //    MessageBox.Show("蜂鸣器打开失败");
                //}
            }
            catch
            {
                MessageBox.Show("设备初始化失败");
            }
            Login();
        }