示例#1
0
 private void ToModel()
 {
     this.bill.BH     = this.textBox1.Text.Trim();
     this.bill.GFMC   = this.textBox2.Text.Trim();
     this.bill.GFSH   = this.textBox3.Text.Trim();
     this.bill.GFDZDH = this.textBox4.Text.Trim();
     this.bill.XFDZ   = this.textBox5.Text.Trim();
     this.bill.KHYHMC = this.textBox6.Text.Trim();
     this.bill.SCCJMC = this.textBox7.Text.Trim();
     this.bill.CM     = this.textBox8.Text.Trim();
     this.bill.TYDH   = this.textBox9.Text.Trim();
     this.bill.QYD    = this.textBox10.Text.Trim();
     this.bill.ZHD    = this.textBox11.Text.Trim();
     this.bill.XHD    = this.textBox12.Text.Trim();
     this.bill.XFDH   = this.textBox13.Text.Trim();
     this.bill.KHYHZH = this.textBox14.Text.Trim();
     this.bill.XFDZDH = this.textBox15.Text.Trim();
     this.bill.XFYHZH = this.textBox16.Text.Trim();
     this.bill.DW     = this.textBox17.Text.Trim();
     this.bill.MDD    = this.textBox18.Text.Trim();
     this.bill.DJRQ   = this.dateTimePicker1.Value.Date;
     this.bill.DJYF   = this.bill.DJRQ.Month;
     if (this.textBox21.Text.Trim() == "")
     {
         this.bill.SLV = 0.0;
     }
     else
     {
         this.bill.SLV = CommonTool.Todouble(this.textBox21.Text.Trim());
     }
     if (this.textBox20.Text.Trim() == "")
     {
         this.bill.JEHJ = 0.0;
     }
     else
     {
         this.bill.JEHJ = CommonTool.Todouble(this.textBox20.Text.Trim());
         this.bill.JEHJ = SaleBillCtrl.GetRound(this.bill.JEHJ, 2);
     }
     this.bill.BZ     = this.textBox22.Text.Trim();
     this.bill.GFYHZH = this.textBox23.Text.Trim();
     this.bill.DJZL   = "j";
 }
示例#2
0
 private void InitAchievement()
 {
     if (!string.IsNullOrEmpty(AchievementController.Instance.CurAchievementName) && GuiController.Instance.CompetitionGUI == GuiFrameID.ChapterFrame)
     {
         curAchievementBtn.SetActive(true);
         achievementDetailBgInSettlement.SetActive(true);
         achievementDetailPageInSettlement.SetActive(true);
         CommonTool.GuiScale(achievementDetailPageInSettlement, canvasGroup, true);
         curAchievementInstance = AchievementController.Instance.GetCurAchievement();
         achievementDetailImageInSettlement.sprite    = SkinController.Instance.GetSprite(curAchievementInstance.imageIndex);
         achievementDetailMainTitleInSettlement.text  = LanguageController.Instance.GetLanguage(curAchievementInstance.mainTitleIndex);
         achievementDetailSubTitleInSettlement.text   = LanguageController.Instance.GetLanguage(curAchievementInstance.subTitleIndex);
         achievementDetailFinishTimeInSettlement.text = GetFinishTime(curAchievementInstance.finishTime);
     }
     else
     {
         curAchievementBtn.SetActive(false);
     }
 }
示例#3
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(txtEngName.Text))
            {
                CommonTool.ShowMessage("Name can not NULL!");
                return;
            }

            if (string.IsNullOrEmpty(txtOtherName.Text))
            {
                CommonTool.ShowMessage("Other Name can not NULL!");
                return;
            }

            new SystemData().GetUsrAuthGroup();

            UsrAuthGroupInfo usrAuthGroupInfo = new UsrAuthGroupInfo();

            usrAuthGroupInfo.GrpEngName   = txtEngName.Text;
            usrAuthGroupInfo.GrpOtherName = txtOtherName.Text;

            usrAuthGroupInfo.CreateBy   = usrName;
            usrAuthGroupInfo.CreateTime = DateTime.Now.ToString();

            try
            {
                if (isAdd)
                {
                    _control.AddEntity(usrAuthGroupInfo);
                    isAdd = false;
                }
                else
                {
                    usrAuthGroupInfo.ID = Convert.ToInt32(gvUsrAuthGrp.GetRowCellValue(gvUsrAuthGrp.FocusedRowHandle, "ID"));
                    _control.UpdateEntity(usrAuthGroupInfo);
                }

                BindData();
            }
            catch (Exception ex) { LogHelper.Error(this.Name, ex); }

            CommonTool.ShowMessage("Save successful!");
        }
示例#4
0
 public GenerateFP(InvType typeFP)
 {
     this.log        = LogUtil.GetLogger <GenerateFP>();
     this.fptkBLL    = new FPTKdal();
     this.billBL     = SaleBillCtrl.Instance;
     this.generBL    = GenerateInvoice.Instance;
     this.taxCard    = TaxCardFactory.CreateTaxCard();
     this.IsNewJDC   = false;
     this.NPCType    = 0;
     this.components = null;
     this.FPleftnum  = 0;
     this.Initialize();
     base.StartPosition  = FormStartPosition.CenterScreen;
     this.fpType         = typeFP;
     this.FPType_Card    = (InvoiceType)this.fpType;
     this.djType         = CommonTool.GetInvTypeStr(typeFP);
     this.lableFPZL.Text = ShowString.ShowFPZL(this.djType);
     this.FPleftnum      = (int)this.taxCard.GetInvNumber(this.FPType_Card);
 }
        /// <summary>
        /// 分页已参与项目
        /// </summary>
        /// <returns></returns>
        public string GetJoinedSurvey()
        {
            if (Session["userId"] == null)
            {
                return(Json("-1", "登录超时,请重新登录!"));
            }
            var page     = Request["page"] ?? "1";
            var pageSize = Request["pageSize"] ?? "0";

            if (!CommonTool.IsNumber(page) || !CommonTool.IsNumber(pageSize))
            {
                return(Json("0", "请求数据错误"));
            }
            B_Project b_Project = new B_Project();
            var       count     = 0;
            var       list      = b_Project.GetJoinedSurvey(Session["userId"] + "", Convert.ToInt32(page), Convert.ToInt32(pageSize), out count);

            return(Json("1", "", new { count = count, list = list }));
        }
示例#6
0
    public List <SaveFileInstance> ReadAllRecords()
    {
        List <SaveFileInstance> recordList = new List <SaveFileInstance>();

        string[] fileNames = Directory.GetFiles(saveDir, "*.sav");
        string   data;

        for (int i = 0; i < fileNames.Length; i++)
        {
            data = CommonTool.GetDataFromDataPath(fileNames[i]);
            if (string.IsNullOrEmpty(data))
            {
                continue;
            }
            SaveFileInstance saveFileInstance = JsonUtility.FromJson <SaveFileInstance>(data);
            recordList.Add(saveFileInstance);
        }
        return(recordList);
    }
        private void GetInfo(string key, string pageIndex, string pageSize, string sortField, string sortOrder)
        {
            #region 初始化分页排序信息
            SearchCondition cnd = new SearchCondition();
            cnd.AllowPaging = true;
            int index = 1, size = 10;
            int.TryParse(pageIndex, out index);
            int.TryParse(pageSize, out size);
            cnd.CurrentPage = index;
            cnd.PageSize    = size;
            if (!string.IsNullOrEmpty(sortField))
            {
                cnd.AddSortSql(string.Format("{0} {1}", sortField, sortOrder));
            }
            else
            {
                cnd.AddSort("ID");
            }
            #endregion

            #region 初始化查询条件
            if (!string.IsNullOrEmpty(key))
            {
                cnd.AddSearchSql(string.Format("and (Title like '%{0}%' or Description like '%{0}%')", key.Replace("'", "''")));
            }
            #endregion

            #region 查询数据

            SQLHelper sh     = SQLHelper.CreateSqlHelper(ConnEnum.Common.ToString());
            string    sql    = string.Format("select * from BusinessUnit where IsDelete=0");
            var       dt     = sh.ExecuteDataTable(SearchCondition.CreatePagerSql(sql, cnd));
            var       count  = sh.ExecuteScalar(SearchCondition.CreateCountSql(sql, cnd));
            ArrayList data   = CommonTool.DataTable2ArrayList(dt);
            Hashtable result = new Hashtable();
            result["data"]  = data;
            result["total"] = Convert.ToInt32(count);
            #endregion

            Response.ContentType = "text/plain";
            Response.Write(PluSoft.Utils.JSON.Encode(result));
            Response.End();
        }
示例#8
0
        private void CreateZheKouHang(XSDJ xsdjt, int i, int j, double JE, double SE, double ZKL, int ZKHCount)
        {
            TempXSDJ_MX item = new TempXSDJ_MX {
                Hwmc  = CommonTool.GetDisCountMC(ZKL, ZKHCount),
                Zkl   = new double?(ZKL),
                Bhsje = new double?(-1.0 * JE),
                Se    = new double?(-1.0 * SE),
                DJBH  = xsdjt.Dj[i].Djh,
                Slv   = xsdjt.Dj[i].Mingxi[j - 1].Slv,
                Jgfs  = xsdjt.Dj[i].Mingxi[j - 1].Jgfs,
                Spsm  = xsdjt.Dj[i].Mingxi[j - 1].Spsm,
                Fpzl  = xsdjt.Dj[i].Mingxi[j - 1].Fpzl,
                Djhxz = 4,
                Sl    = 0.0,
                Dj    = 0.0
            };

            xsdjt.Dj[i].Mingxi.Insert(j, item);
        }
示例#9
0
 public string SendForgetMail(string email)
 {
     try
     {
         var user = new UserDAL().GetUser(email);
         if (user == null)
         {
             return("未找到用户,请检查邮箱!");
         }
         CommonTool.Sendmail(email, @"这是一封来自UES的找回密码邮件,请点击下面链接修改密码
                 http://" + HttpContext.Request.Url.Authority + "/login/ResetPass?e=" + CommonTool.Encrypt(email) + "&t=" + CommonTool.Encrypt(DateTime.Now.ToString()),
                             "UES找回密码");
         return("true");
     }
     catch (Exception ex)
     {
         return(ex.Message);
     }
 }
示例#10
0
        public void Main()
        {
            try
            {
                //initial log4net
                CommonTool.LoadLog4netConfig();

                var get = CommonTool.GetData("https://api.rezdy.com/latest/availability?apiKey=0b3d137cc1db4108a92c309fa7d7f6da&productCode=PVVRFE&startTimeLocal=2018-11-01 00:00:00&endTimeLocal=2019-12-31 00:00:00");
                //RezdyPackageModel

                RezdyPackageModel obj = JsonConvert.DeserializeObject <RezdyPackageModel>(get);

                //do something
            }
            catch (Exception ex)
            {
                _log.Debug(ex.ToString());
            }
        }
示例#11
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(txtEngName.Text))
            {
                CommonTool.ShowMessage("English Name can not NULL!");
                return;
            }

            if (string.IsNullOrEmpty(txtOtherName.Text))
            {
                CommonTool.ShowMessage("Other Name can not NULL!");
                return;
            }

            TaMenuItemOtherChoiceInfo taMenuItemOtherChoiceInfo = new TaMenuItemOtherChoiceInfo();

            taMenuItemOtherChoiceInfo.MiEngName      = txtEngName.Text;
            taMenuItemOtherChoiceInfo.MiOtherName    = txtOtherName.Text;
            taMenuItemOtherChoiceInfo.MiPrice        = string.IsNullOrEmpty(txtAddPrice.Text) ? "0.00" : txtAddPrice.Text;
            taMenuItemOtherChoiceInfo.IsAutoAppend   = chkEditAppend.Checked ? "Y" : "N";
            taMenuItemOtherChoiceInfo.IsEnableChoice = chkEditEnableChoice.Checked ? "Y" : "N";
            taMenuItemOtherChoiceInfo.MiID           = miID;
            taMenuItemOtherChoiceInfo.MiType         = miType;

            try
            {
                if (isAdd)
                {
                    _control.AddEntity(taMenuItemOtherChoiceInfo);
                    isAdd = false;
                }
                else
                {
                    taMenuItemOtherChoiceInfo.ID = Convert.ToInt32(gvOtherChoice.GetRowCellValue(gvOtherChoice.FocusedRowHandle, "ID"));
                    _control.UpdateEntity(taMenuItemOtherChoiceInfo);
                }

                BindData(miType);
            }
            catch (Exception ex) { LogHelper.Error(this.Name, ex); }

            CommonTool.ShowMessage("Save successful!");
        }
示例#12
0
        public RSModel setStep2(SupplierLoginRSModel supplierLoginRSModel, long prodOid, RezdyProductModel rezdyProductModel, SCMProductModel scmModel)
        {
            try
            {
                //Startup startup = new Startup();
                //startup.Initial();
                RSModel rsModel = new RSModel();
                JObject scmRSModel;

                //scmModel.json.tagCd = new List<string>();
                if (rezdyProductModel.Product.productType == "DAYTOUR")
                {
                    scmModel.json.tagCd = new List <string>(new String[] { "TAG_4_4" }); // 商品分類 一日遊
                }
                else if (rezdyProductModel.Product.productType == "MULTIDAYTOUR")
                {
                    scmModel.json.tagCd = new List <string>(new String[] { "TAG_4_5" }); // 商品分類 多日遊
                }
                //後面參數為model有null時 不顯示在model內
                scmRSModel = CommonTool.GetDataPost(string.Format(Startup.Instance.GetParameter(PMSSourse.KKday, ParameterType.KKdayApi_productmodify), prodOid), JsonConvert.SerializeObject(scmModel,
                                                                                                                                                                                              Newtonsoft.Json.Formatting.None,
                                                                                                                                                                                              new JsonSerializerSettings
                {
                    NullValueHandling = NullValueHandling.Ignore
                }));
                if (scmRSModel["content"]["result"].ToString() != "0000")
                {
                    rsModel.result = scmRSModel["content"]["result"].ToString();
                    rsModel.msg    = scmRSModel["content"]["msg"].ToString();
                    return(rsModel);
                }

                rsModel.result = scmRSModel["content"]["result"].ToString();
                rsModel.msg    = scmRSModel["content"]["msg"].ToString();

                return(rsModel);
            }
            catch (Exception ex)
            {
                _log.Debug(ex.ToString());
                throw ex;
            }
        }
示例#13
0
        public DataProcess(String paraInstrumentID)
        {
            if (!GlobalVar.mysqltool.Connect())
            {
                throw new Exception("Can't Connect DB");
            }
            instrumentID = paraInstrumentID;

            // 获取品种信息及对应交易时段
            productID  = CommonTool.GetProduct(instrumentID);
            productSrc = (String)GlobalVar.ds.Tables["product"].Rows.Find(productID)["BelongTo"];
            periodID   = (String)GlobalVar.ds.Tables["product"].Rows.Find(productID)["PeriodID"];
            drSegment  = GlobalVar.ds.Tables["tradesegment"].Select("PeriodID='" + periodID + "'", "SeqNo asc");

            if (drSegment.Length <= 0)
            {
                throw new Exception("Can't Find Instrument");
            }
        }
示例#14
0
    void Init()
    {
        mProgressBarObj = ObjCachePoolMgr.Instance.LoadFromCache(mPoolType, mPoolKey) as GameObject;
        if (mProgressBarObj == null)
        {
            mProgressBarObj = (GameObject)GameObject.Instantiate(mHudActorWin.ProgressObj);

            PoolGameObject pg = mProgressBarObj.AddComponent <PoolGameObject>();
            pg.poolType = mPoolType;
            pg.key      = mPoolKey;
        }

        var trans = mProgressBarObj.transform;

        trans.SetParent(mHudActorWin.ProgressRootTrans);
        trans.localPosition = Vector3.zero;
        trans.localScale    = new Vector3(1f, 1f, 1f);
        CommonTool.SetActive(mProgressBarObj, true);

        mProgressBar = UIHelper.FindChild(mProgressBarObj, "Slider").gameObject.GetComponent <Slider>();
        mProgressBar.interactable = false;

        GameObject groundObject = UIHelper.FindChild(mProgressBarObj, "Background").gameObject;

        mBackgroundSprite = groundObject.GetComponent <Image>();

        groundObject   = UIHelper.FindChild(mProgressBarObj, "Foreground").gameObject;
        mForegroundBar = groundObject.GetComponent <Slider>();
        mForegroundBar.interactable = false;

        mBarFill = UIHelper.FindChild(groundObject, "Fill").GetComponent <Image>();

        mTextTrans  = mProgressBarObj.transform;
        mOwnerTrans = transform;

        mScreenOffset = UI3DText.HpProgressScreenOffset;

        mEvilValueTag = UIHelper.FindChild(mProgressBarObj, "EvilValueTag");
        mEvilValue    = UIHelper.FindChild(mProgressBarObj, "EvilValue").GetComponent <Text>();

        InitEvent();
    }
示例#15
0
        private void btnDel_Click(object sender, EventArgs e)
        {
            new SystemData().GetTaMenuItemOtherChoice();

            if (CommonTool.ConfirmDelete() == DialogResult.Cancel)
            {
                return;
            }
            else
            {
                try
                {
                    _control.DeleteEntity(CommonData.TaMenuItemOtherChoice.FirstOrDefault(s => s.ID == Convert.ToInt32(gvOtherChoice.GetRowCellValue(gvOtherChoice.FocusedRowHandle, "ID"))));
                    CommonTool.ShowMessage("Delete successful!");
                    BindData(miType);
                    isAdd = false;
                }
                catch (Exception ex) { LogHelper.Error(this.Name, ex); }
            }
        }
示例#16
0
        public void Clear()
        {
            if (TimeText != null)
            {
                CommonTool.SetActive(TimeText.gameObject, false);
            }

            if (mLockImage != null)
            {
                CommonTool.SetActive(mLockImage.gameObject, false);
            }

            if (CdImageTrans != null)
            {
                CommonTool.SetActive(CdImageTrans.gameObject, false);
            }

            Is_CD = false;
            State = LockState.Open;
        }
示例#17
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(txtDriverName.Text))
            {
                CommonTool.ShowMessage("Driver Name can not NULL!");
                return;
            }

            if (string.IsNullOrEmpty(txtPhoneNum.Text))
            {
                CommonTool.ShowMessage("Phone Number can not NULL!");
                return;
            }

            new SystemData().GetTaDriver();

            TaDriverInfo taDriverInfo = new TaDriverInfo();

            taDriverInfo.DriverName    = txtDriverName.Text;
            taDriverInfo.DriverNumber  = txtPhoneNum.Text;
            taDriverInfo.DriverWorkDay = chkWorkDay.EditValue.ToString();

            try
            {
                if (isAdd)
                {
                    _control.AddEntity(taDriverInfo);
                    isAdd = false;
                }
                else
                {
                    taDriverInfo.ID = Convert.ToInt32(gvTaDriver.GetRowCellValue(gvTaDriver.FocusedRowHandle, "ID"));
                    _control.UpdateEntity(taDriverInfo);
                }

                BindData();
            }
            catch (Exception ex) { LogHelper.Error(this.Name, ex); }

            CommonTool.ShowMessage("Save successful!");
        }
 static public void BreakPoint()
 {
     while (true)
     {
         if (!IFRun())
         {
             point         = 0;
             Form1.isBreak = false;
             Form1.isStep2 = false;
             return;
         }
         else
         {
             string strArg1 = Register.GetRegisterValue("pc");
             int    PC      = (Int32)CommonTool.StrToNum(TypeCode.Int32, strArg1, 16);
             int    index   = (PC - RunTimeCode.CodeStartAddress) / 4;
             if (Form1.breakpoints.Count > 0 && point < Form1.breakpoints.Count)
             {
                 if (Form1.breakpoints.Contains(index))
                 {
                     int indexKey = Form1.breakpoints.IndexOf(index);
                     if (point < indexKey)
                     {
                         point = indexKey;
                     }
                 }
                 if (Form1.breakpoints.ElementAt(point) == index)
                 {
                     point++;
                     Form1.codeColor(index, 1);
                     return;
                 }
             }
             mIFStage.Start();
             mDEStage.Start();
             mEXEStage.Start();
             mMEMStage.Start();
             mWBStage.Start();
         }
     }
 }
示例#19
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            for (int i = 0; i < 4; i++)
            {
                new SystemData().GetTaMenuSet();
                TaMenuSetInfo taMenuSetInfo = new TaMenuSetInfo();
                taMenuSetInfo.MSEngName   = txtEngName[i].Text;
                taMenuSetInfo.MSOtherName = txtOtherName[i].Text;

                try
                {
                    //taMenuSetInfo.ID = Convert.ToInt32(gvTaMenuSet.GetRowCellValue(gvTaMenuSet.FocusedRowHandle, "ID"));
                    //_control.UpdateEntity(taMenuSetInfo);
                    taMenuSetInfo.ID = Convert.ToInt32(lblID[i].Text);
                    _control.UpdateEntity(taMenuSetInfo);
                }
                catch (Exception ex) { LogHelper.Error(this.Name, ex); }
            }

            CommonTool.ShowMessage("Save successful!");
        }
示例#20
0
        private void btnDelete_Click(object sender, EventArgs e)
        {
            new SystemData().GetUsrBase();
            new SystemData().GetUsrAuthAccess();

            if (CommonTool.ConfirmDelete() == DialogResult.Cancel)
            {
                return;
            }
            else
            {
                try
                {
                    _control.DeleteEntity(CommonData.UsrBase.FirstOrDefault(s => s.ID == Convert.ToInt32(gvUsrSet.GetRowCellValue(gvUsrSet.FocusedRowHandle, "ID"))));
                    _control.DeleteEntity(CommonData.UsrAuthAccess.FirstOrDefault(s => s.ID == Convert.ToInt32(gvUsrSet.GetRowCellValue(gvUsrSet.FocusedRowHandle, "UsrAccID"))));
                    CommonTool.ShowMessage("Delete successful!");
                    BindData();
                }
                catch (Exception ex) { LogHelper.Error(this.Name, ex); }
            }
        }
示例#21
0
        private void btnDel_Click(object sender, EventArgs e)
        {
            new SystemData().GetTaMenuCate();

            if (CommonTool.ConfirmDelete() == DialogResult.Cancel)
            {
                return;
            }
            else
            {
                try
                {
                    _control.DeleteEntity(CommonData.TaMenuCate.FirstOrDefault(
                                              s => s.ID == Convert.ToInt32(gvMenuCate.GetRowCellValue(gvMenuCate.FocusedRowHandle, "ID"))));
                }
                catch (Exception ex)
                {
                    LogHelper.Error(this.Name, ex);
                }
            }
        }
示例#22
0
    void Start()
    {
        id = GuiFrameID.FightFrame;
        Dictionary <string, MyRectTransform> rectTransforms = LayoutController.Instance.GetLayoutData();

        InitLayout(rectTransforms);
        Init();

        timeCost   = 0;
        order      = true;
        result     = new StringBuilder();
        question   = new StringBuilder();
        resultList = new List <List <int> >();
        equalImg.SetActive(false);
        countdownBg.SetActive(true);
        countdownNumsList = CommonTool.GetGameObjectsContainName(countdownBg, "Countdown_");
        FightController.Instance.GetFightParameter(out pattern, out amount, out symbol);
        FightController.Instance.ResetList();
        ClearAllText();
        StartCoroutine(StartFight());
    }
示例#23
0
        public AisinoDataSet QueryXSDJ(string DJmonth, string DJtype, int pagesize, int pageno)
        {
            Dictionary <string, object> dictionary = new Dictionary <string, object>();

            dictionary.Clear();
            dictionary.Add("DJYF", DJmonth);
            dictionary.Add("DJZL", DJtype);
            if (DJmonth == "0")
            {
                if (CommonTool.isSPBMVersion())
                {
                    return(this.baseDAO.querySQLDataSet("aisino.Fwkp.Wbjk.XSDJGetAllMonth_FLBM", dictionary, pagesize, pageno));
                }
                return(this.baseDAO.querySQLDataSet("aisino.Fwkp.Wbjk.XSDJGetAllMonth", dictionary, pagesize, pageno));
            }
            if (CommonTool.isSPBMVersion())
            {
                return(this.baseDAO.querySQLDataSet("aisino.Fwkp.Wbjk.XSDJFenYe_FLBM", dictionary, pagesize, pageno));
            }
            return(this.baseDAO.querySQLDataSet("aisino.Fwkp.Wbjk.XSDJFenYe", dictionary, pagesize, pageno));
        }
示例#24
0
        /// <summary>
        /// 设置没有开启倒计时状态
        /// </summary>
        public void SetNoStart()
        {
            gameObject.SetActive(true);

            if (mLockImage != null)
            {
                CommonTool.SetActive(mLockImage.gameObject, true);
                mLockImage.color = new Color(255.0f, 255.0f, 255.0f, 255.0f);
            }

            if (CdImageTrans != null)
            {
                CommonTool.SetActive(CdImageTrans.gameObject, false);
            }

            if (TimeText != null)
            {
                TimeText.text = "";
            }
            State = LockState.NOStart;
        }
示例#25
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(txtPrtName.Text))
            {
                CommonTool.ShowMessage("Printer Name can not NULL!");
                return;
            }

            if (string.IsNullOrEmpty(txtPrtCode.Text))
            {
                CommonTool.ShowMessage("Printer Code can not NULL!");
                return;
            }

            new SystemData().GetSysPrtList();

            SysPrtSetInfo sysPrtSetInfo = new SysPrtSetInfo();

            sysPrtSetInfo.PrtCode = txtPrtCode.Text;
            sysPrtSetInfo.PrtName = txtPrtName.Text;

            try
            {
                if (isAdd)
                {
                    _control.AddEntity(sysPrtSetInfo);
                    isAdd = false;
                }
                else
                {
                    sysPrtSetInfo.ID = Convert.ToInt32(gvPrtSet.GetRowCellValue(gvPrtSet.FocusedRowHandle, "ID"));
                    _control.UpdateEntity(sysPrtSetInfo);
                }

                BindData();
            }
            catch (Exception ex) { LogHelper.Error(this.Name, ex); }

            CommonTool.ShowMessage("Save successful!");
        }
示例#26
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(txtKeyName.Text))
            {
                CommonTool.ShowMessage("Keypad Name can not NULL!");
                return;
            }

            if (string.IsNullOrEmpty(txtKeyCode.Text))
            {
                CommonTool.ShowMessage("Keypad Name can not NULL!");
                return;
            }

            new SystemData().GetKeypadList();

            KeypadInfo keypadInfo = new KeypadInfo();

            keypadInfo.KeyName = txtKeyName.Text;
            keypadInfo.KeyCode = txtKeyCode.Text;

            try
            {
                if (isAdd)
                {
                    _control.AddEntity(keypadInfo);
                    isAdd = false;
                }
                else
                {
                    keypadInfo.ID = Convert.ToInt32(gvKeypad.GetRowCellValue(gvKeypad.FocusedRowHandle, "ID"));
                    _control.UpdateEntity(keypadInfo);
                }

                BindData();
            }
            catch (Exception ex) { LogHelper.Error(this.Name, ex); }

            CommonTool.ShowMessage("Save successful!");
        }
示例#27
0
        private void btnDelete_Click(object sender, EventArgs e)
        {
            if (CommonTool.ConfirmDelete() == DialogResult.Cancel)
            {
                return;
            }
            else
            {
                if (gvCompCustomer.RowCount < 1)
                {
                    return;
                }

                _control.DeleteEntity(CommonData.TaCustomer.FirstOrDefault(s => s.ID == Convert.ToInt32(gvCompCustomer.GetRowCellValue(gvCompCustomer.FocusedRowHandle, "ID"))));
                BindData("", "", "");

                if (gvCompCustomer.RowCount < 1)
                {
                    txtPhone.Text    = "";
                    txtName.Text     = "";
                    txtHouseNo.Text  = "";
                    txtAddress.Text  = "";
                    txtPcZone.Text   = "";
                    txtDistance.Text = "";
                    //luePostcode.Text = "";
                    txtPostcode.Text       = "";
                    txtDelCharge.Text      = "";
                    txtReadyTime.Text      = "";
                    txtIntNotes.Text       = "";
                    txtNotesOnBill.Text    = "";
                    chkBlackListed.Checked = false;
                }
                else
                {
                    cusNum = gvCompCustomer.GetRowCellValue(gvCompCustomer.FocusedRowHandle, "cusPhone") == null ? "" : gvCompCustomer.GetRowCellValue(gvCompCustomer.FocusedRowHandle, "cusPhone").ToString();
                }
            }

            isClear = false;
        }
示例#28
0
    private void InitShareFrame()
    {
        switch (content.id)
        {
        case ShareID.Achievement:
            saveFileSharePage.SetActive(false);
            achievementDetailPage.SetActive(true);
            bluetoothSharePage.SetActive(false);
            rankSharePage.SetActive(false);
            InitAchievement();
            CommonTool.GuiScale(achievementDetailPage, canvasGroup, true);
            break;

        case ShareID.SaveFile:
            saveFileSharePage.SetActive(true);
            achievementDetailPage.SetActive(false);
            bluetoothSharePage.SetActive(false);
            rankSharePage.SetActive(false);
            InitSaveFile();
            CommonTool.GuiScale(saveFileSharePage, canvasGroup, true);
            break;

        case ShareID.Bluetooth:
            saveFileSharePage.SetActive(false);
            achievementDetailPage.SetActive(false);
            bluetoothSharePage.SetActive(true);
            rankSharePage.SetActive(false);
            InitBluetooth();
            CommonTool.GuiScale(bluetoothSharePage, canvasGroup, true);
            break;

        case ShareID.Rank:
            saveFileSharePage.SetActive(false);
            achievementDetailPage.SetActive(false);
            bluetoothSharePage.SetActive(false);
            rankSharePage.SetActive(true);
            InitRank();
            break;
        }
    }
示例#29
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(txtEngName.Text))
            {
                CommonTool.ShowMessage("English Name can not NULL!");
                return;
            }

            if (string.IsNullOrEmpty(txtOtherName.Text))
            {
                CommonTool.ShowMessage("Other Name can not NULL!");
                return;
            }

            new SystemData().GetTaSubMenuDetail();
            TaSubMenuDetailInfo taSubMenuDetailInfo = new TaSubMenuDetailInfo();

            taSubMenuDetailInfo.smID      = subMenuID;
            taSubMenuDetailInfo.EngName   = txtEngName.Text;
            taSubMenuDetailInfo.OtherName = txtOtherName.Text;

            try
            {
                if (isAdd)
                {
                    _control.AddEntity(taSubMenuDetailInfo);
                    isAdd = false;
                }
                else
                {
                    taSubMenuDetailInfo.ID = Convert.ToInt32(gvTaSubMenuDetail.GetRowCellValue(gvTaSubMenuDetail.FocusedRowHandle, "ID"));
                    _control.UpdateEntity(taSubMenuDetailInfo);
                }

                BindData();
            }
            catch (Exception ex) { LogHelper.Error(this.Name, ex); }

            CommonTool.ShowMessage("Save successful!");
        }
示例#30
0
        private void btnGenSave_Click(object sender, EventArgs e)
        {
            TaSysPrtSetGeneralInfo generalInfo = new TaSysPrtSetGeneralInfo();

            generalInfo.IsPrtLogo    = chkPrtLogo.Checked ? "Y" : "N";
            generalInfo.LogoFilePath = lblFilePath.Text;


            generalInfo.IsPrtStaff = chkPrtStaff.Checked ? "Y" : "N";
            generalInfo.IsPrtTel   = chkPrtTel.Checked ? "Y" : "N";
            generalInfo.IsPrtAddr  = chkPrtAddr.Checked ? "Y" : "N";

            generalInfo.TelNo = txtTelNo.Text;
            generalInfo.VATNo = txtVatNo.Text;
            generalInfo.Msg1  = txtMsg1.Text;
            generalInfo.Msg2  = txtMsg2.Text;
            generalInfo.Msg3  = txtMsg3.Text;
            generalInfo.Msg4  = txtMsg4.Text;
            generalInfo.Msg5  = txtMsg5.Text;

            try
            {
                new SystemData().GetTaSysPrtSetGeneral();

                var lstGen = CommonData.TaSysPrtSetGeneral;

                if (lstGen.Any())
                {
                    generalInfo.ID = lstGen.FirstOrDefault().ID;
                    _control.UpdateEntity(generalInfo);
                }
                else
                {
                    _control.AddEntity(generalInfo);
                }
            }
            catch (Exception ex) { LogHelper.Error(this.Name, ex); }

            CommonTool.ShowMessage("Save successful!");
        }