Inheritance: MonoBehaviour
Exemplo n.º 1
0
        /// <summary>
        /// 컨트롤을 셋팅합니다.
        /// </summary>
        private void SetControlnitialize()
        {
            try
            {
                //영업장
                DataTable dtBiz = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter);
                dtBiz.Rows.Add(new object[] { "V_BIZ_CODE", Parm.CurrentUserInformation.BizInfo.BizCode });
                DataSet dsTmp = DataLayer.ExecuteSpDataset("PKG_COMM.PR_02", dtBiz, DataLayer.MessageEncoding.Default);
                LookUp.SetFillCode(this.lupSrchFacilityCode, dsTmp.Tables[0], "FACILITY_NAME", "FACILITY_CODE", LookUp.CaptoinStyle.SelectText);
                //객실유형
                DataTable dtRoom = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter);
                dtRoom.Rows.Add(new object[] { "V_BIZ_CODE", Parm.CurrentUserInformation.BizInfo.BizCode });
                DataSet dsTmp1 = DataLayer.ExecuteSpDataset("PKG_COMM.PR_17", dtRoom, DataLayer.MessageEncoding.Default);
                LookUp.SetFillCode(this.lupSrchRoomType, dsTmp1.Tables[0], "ROOM_TYPE_NAME", "ROOM_TYPE", LookUp.CaptoinStyle.SelectText);

                this.dtpFrom.Properties.Mask.EditMask = "(1[9]|2[0-9])\\d\\d-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])";
                this.dtpTo.Properties.Mask.EditMask   = "(1[9]|2[0-9])\\d\\d-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])";

                this.dtpFrom.Properties.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.RegEx;
                this.dtpTo.Properties.Mask.MaskType   = DevExpress.XtraEditors.Mask.MaskType.RegEx;

                this.dtpFrom.EditValue = DateTime.Now;
                this.dtpTo.EditValue   = DateTime.Now.AddMonths(1);

                //BizCommon.BasicCode.FillBasicCode(lupRsvNo, "DA009", BizCommon.BasicCode.BasicCodeReturnStyle.SelectStringCaption);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 2
0
        private void PrepareEmployeeDocuments(HttpFileCollection hfc, EmployeeHeader employeeHeader, List <EmployeeDocument> employeeDocuments, List <EmployeeDocumentViewModel> employeeDocumentViewModel)
        {
            for (var i = 0; i < hfc.Count; i++)
            {
                HttpPostedFile httpPostedFileBase = hfc[i];
                foreach (var item in employeeDocumentViewModel)
                {
                    if (item.Name == httpPostedFileBase.FileName)
                    {
                        EmployeeDocument employeeDocument = new EmployeeDocument();
                        LookUp           lookUp           = LookUpCodeService.GetLookUp <LookUp>(l => l.LookUpCode == item.DocumentType).FirstOrDefault();
                        bool             employeeHeaders  = employeeHeader.EmployeeDocument != null?employeeHeader.EmployeeDocument.Any(e => e.DocumentType == lookUp.LookUpID && e.FileName == item.Name) : false;

                        if (!employeeHeaders)
                        {
                            employeeDocument.CreatedBy    = USER_OBJECT.UserID;
                            employeeDocument.CreatedOn    = DateTimeConverter.SingaporeDateTimeConversion(DateTime.Now);
                            employeeDocument.FileName     = httpPostedFileBase.FileName;
                            employeeDocument.BranchId     = USER_OBJECT.BranchId;
                            employeeDocument.DocumentType = LookUpCodeService.GetLookUp <LookUp>(l => l.LookUpCode == item.DocumentType).Select(s => s.LookUpID).FirstOrDefault();;
                            // employeeDocuments.Add(employeeDocument);
                            SaveFile(httpPostedFileBase);
                            employeeHeader.EmployeeDocument = employeeHeader.EmployeeDocument == null ? new List <EmployeeDocument>() : employeeHeader.EmployeeDocument;
                            employeeHeader.EmployeeDocument.Add(employeeDocument);
                        }
                    }
                }
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// 컨트롤을 셋팅합니다.
        /// </summary>
        private void SetControlnitialize()
        {
            try
            {
                this.dtpFrom.Properties.Mask.EditMask = "(1[9]|2[0-9])\\d\\d-(0[1-9]|1[012]) ";
                this.dtpFrom.Properties.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.RegEx;
                this.dtpFrom.EditValue = DateTime.Now.ToString("yyyyMM");
                this.dtpFrom.Properties.Mask.UseMaskAsDisplayFormat = true;

                DataTable dtlupFacility = new DataTable("dtlupFacility");
                dtlupFacility.Columns.Add("FACILITY_CODE");
                dtlupFacility.Columns.Add("FACILITY_NAME");
                DataTable dtParm = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter);
                dtParm.Rows.Add(new object[] { "V_BIZ_CODE", Parm.CurrentUserInformation.BizInfo.BizCode });
                DataSet ds = DataLayer.ExecuteSpDataset("PKG_COMM.PR_25", dtParm, DataLayer.MessageEncoding.Default);
                dtlupFacility.Load(ds.Tables[0].CreateDataReader());

                LookUp.SetFillCode(lupFacilityCode, dtlupFacility, "FACILITY_NAME", "FACILITY_CODE", LookUp.CaptoinStyle.None);
                this.lupFacilityCode.ItemIndex = 0;
            }
            catch (Exception ex)
            {
                Basic.ShowMessage(3, ex.Message);
            }
        }
Exemplo n.º 4
0
        public ActionResult NewVAT(string vat)
        {
            if (_systemService.GetLookUp(Constants.LuVat).Count(m => m.LookUpValue.Equals(vat)) > 0)
            {
                return(Json(new { result = Constants.Duplicate }));
            }

            try
            {
                var model = new LookUp
                {
                    LookUpType  = Constants.LuVat,
                    LookUpKey   = vat,
                    LookUpValue = vat,
                    Enable      = true
                };
                _systemService.InsertLookUp(model);

                return(Json(new { result = Constants.Success }));
            }
            catch (Exception e)
            {
                Log.Error("Create New Client!", e);
                return(Json(new { result = Constants.UnSuccess }));
            }
        }
Exemplo n.º 5
0
        /// <summary>
        /// 기초코드를 바인딩합니다.
        /// </summary>
        private void SetBasicCodeBinding()
        {
            try
            {
                //this.lupFacilityCode
                DataTable dtParm = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter);
                dtParm.Rows.Add(new object[] { "V_BIZ_CODE", Parm.CurrentUserInformation.BizInfo.BizCode });
                DataSet dsTmp = DataLayer.ExecuteSpDataset("PKG_COMM.PR_02", dtParm, DataLayer.MessageEncoding.Default);
                LookUp.SetFillCode(this.lupFacilityCode, dsTmp.Tables[0], "FACILITY_NAME", "FACILITY_CODE", LookUp.CaptoinStyle.None);
                this.lupFacilityCode.EditValue = Parm.CurrentUserInformation.roomTask.gsDFacility;
                //영업장을 숨긴다
                //this.lupFacilityCode.Visible = false;

                if (dsTmp.Tables[0].Rows.Count == 1)
                {
                    this.lupFacilityCode.Visible = false;
                    this.labFacilityCode.Visible = false;
                }

                //시즌바인딩
                GetSeason();

                // 마감 체크하여 버튼 enable 변경
                SetNAStatus(CheckNAStart());
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 6
0
        /// <summary>
        /// 컨트롤을 셋팅합니다.
        /// </summary>
        private void SetControlnitialize()
        {
            try
            {
                this.dtpFrom.Properties.Mask.EditMask = "(1[9]|2[0-9])\\d\\d-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]) ";
                this.dtpTo.Properties.Mask.EditMask   = "(1[9]|2[0-9])\\d\\d-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]) ";

                this.dtpFrom.Properties.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.RegEx;
                this.dtpTo.Properties.Mask.MaskType   = DevExpress.XtraEditors.Mask.MaskType.RegEx;

                this.dtpFrom.EditValue = Convert.ToDateTime(Cls.Common.uDate.GetDateFromYYYY_MM_DD(Parm.CurrentUserInformation.roomTask.gsTaskDate.Trim()));
                this.dtpTo.EditValue   = Convert.ToDateTime(Cls.Common.uDate.GetDateFromYYYY_MM_DD(Parm.CurrentUserInformation.roomTask.gsTaskDate.Trim()));

                string filter = string.Format("USE_YN = 'Y' AND PROJECT_ID = '{0}' AND FACILITY_TYPE = '10' ", base.ProjectID);
                LookUp.SetFillCode(this.lupFacility,
                                   Basic.GetdtSelect(BizCommon.Parm.mDataTable.dtZaa140ms, filter, "FACILITY_CODE"),
                                   "FACILITY_NAME",
                                   "FACILITY_CODE",
                                   LookUp.CaptoinStyle.None
                                   );
                this.lupFacility.EditValue = Parm.CurrentUserInformation.roomTask.gsDFacility;

                BizCommon.BasicCode.FillBasicCode(lupRoomStat, "DA003", BizCommon.BasicCode.BasicCodeReturnStyle.SelectStringCaption);


                //BizCommon.BasicCode.FillBasicCode(lupProductGroupCode_Select   , "A0003", BizCommon.BasicCode.BasicCodeReturnStyle.SelectStringCaption);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 7
0
        /// <summary>
        /// 기초코드를 바인딩합니다.
        /// </summary>
        private void SetBasicCodeBinding()
        {
            try
            {
                /* 기수 */
                DataTable dtParm = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter);
                dtParm.Rows.Add(new object[] { "V_BIZ_CODE", Parm.CurrentUserInformation.BizInfo.BizCode });

                DataSet ds = DataLayer.ExecuteSpDataset("PKG_COMM.PR_21", dtParm, DataLayer.MessageEncoding.Default);
                LookUp.SetFillCode(this.lupYear, ds.Tables[0], "DETAIL_NAME", "DETAIL", LookUp.CaptoinStyle.None);
                this.lupYear.ItemIndex = 0;

                /* 기간 */
                this.dtpFrom.Properties.Mask.EditMask = "(1[9]|2[0-9])\\d\\d-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]) ";
                this.dtpTo.Properties.Mask.EditMask   = "(1[9]|2[0-9])\\d\\d-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]) ";

                this.dtpFrom.Properties.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.RegEx;
                this.dtpTo.Properties.Mask.MaskType   = DevExpress.XtraEditors.Mask.MaskType.RegEx;

                /* 법인구분 */
                BizCommon.BasicCode.FillBasicCode(lupPurchaseCode, "A0005", BasicCode.BasicCodeReturnStyle.SelectStringCaption);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 8
0
        void ServiceClient_GetSysMenuByIDCompleted(object sender, GetSysMenuByIDCompletedEventArgs e)
        {
            LookUp lkParentMenu = Utility.FindChildControl <LookUp>(expander, "lkParentMenu");

            lkParentMenu.DataContext       = e.Result;
            lkParentMenu.DisplayMemberPath = "MENUNAME";
        }
Exemplo n.º 9
0
 public ActionResult SaveEmployeeDesignation(LookUp lookup)
 {
     lookup.LookUpCategory = UTILITY.CONFIG_EMPLOYEEDESIGNATION;
     lookup.BranchId       = BRANCHID;
     lookUpBO.Add(lookup);
     return(RedirectToAction("EmployeeDesignationList"));
 }
Exemplo n.º 10
0
        //주석을 풀고 사용하세요

        /*****************************************************************************
        *
        #region 팝업컨테이너 에티트의 컨트롤 바인딩
        *  /// <summary>
        *  /// 팝업컨테이너 에티트의 컨트롤 바인딩
        *  /// </summary>
        *  /// <param name="popedit">The popedit.</param>
        *  /// <param name="gridName">Name of the grid.</param>
        *  /// <param name="gridViewName">Name of the grid view.</param>
        *  private void SetAddressSchma(DevExpress.XtraEditors.PopupContainerEdit popedit,
        *                            string gridName,
        *                            string gridViewName)
        *  {
        *   try
        *   {
        *
        *       DevExpress.XtraGrid.GridControl grid = new DevExpress.XtraGrid.GridControl();
        *       DevExpress.XtraGrid.Views.Grid.GridView gridView = new DevExpress.XtraGrid.Views.Grid.GridView();
        *
        *       grid.Name = gridName;
        *       gridView.Name = gridViewName;
        *
        *       //DataTable dtType = new DataTable();
        *       //dtType.Columns.Add("FACILITY_CODE"        );
        *       //dtType.Columns.Add("FACILITY_NAME"        );
        *       //dtType.Columns.Add("FACILITY_NAME_ENG"    );
        *       //dtType.Columns.Add("FACILITY_NAME_SHORT"  );
        *       //dtType.Columns.Add("FACILITY_TYPE"        );
        *       //dtType.Columns.Add("FACILITY_TYPE_NAME");
        *       //dtType.Columns.Add("DIRECT_MANAGE_YN"     );
        *       //dtType.Columns.Add("USE_YN"               );
        *       //dtType.Columns.Add("RMRK"                 );
        *
        *       DataTable dtType = Basic.GetdtSelect(Parm.dtZaa140ms, "USE_YN = 'Y'", "FACILITY_CODE");
        *
        *       GridStyle gs = new GridStyle(grid, gridView);
        *       gs.AddColumn("업장코드"  , "FACILITY_CODE"        , _ColumnType.Default ,  80,_ColumnAlign.Center ,  true);
        *       gs.AddColumn("영업장명"  , "FACILITY_NAME"        , _ColumnType.Default ,  80,_ColumnAlign.Center ,  true);
        *       gs.AddColumn("영문명"    , "FACILITY_NAME_ENG"    , _ColumnType.Default ,  80,_ColumnAlign.Center ,  true);
        *       gs.AddColumn("단축명"    , "FACILITY_NAME_SHORT"  , _ColumnType.Default ,  80,_ColumnAlign.Center ,  true);
        *       gs.AddColumn("업장타입"  , "FACILITY_TYPE_NAME"   , _ColumnType.Default ,  80,_ColumnAlign.Center ,  true);
        *       gs.AddColumn("직영여부"  , "DIRECT_MANAGE_YN"     , _ColumnType.Default ,  80,_ColumnAlign.Center ,  true);
        *
        *       Cls.Grid.Options.SelectedRow(gridView);
        *       Cls.Grid.Options.EmbeddedNavigater(grid);
        *       Cls.Grid.Options.FilterRow(gridView, true);
        *       grid.DataSource = dtType;
        *
        *       Cls.Common.uPopupContainer.AddPopupGridControl("product",
        *                                                      new System.Drawing.Size(500, 350),
        *                                                      popedit,
        *                                                      "선택하세요",
        *                                                      grid,
        *                                                      gridView, DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor);
        *
        *       gridView.KeyDown += new System.Windows.Forms.KeyEventHandler(PopupGridview_KeyDown);
        *       gridView.DoubleClick += new System.EventHandler(PopupGridview_DoubleClick);
        *
        *
        *   }
        *   catch (Exception ex)
        *   {
        *       Basic.ShowMessage(3, ex.Message);
        *   }
        *  }
        #endregion
        *
        #region 팝업그리드 뷰에서의 키이벤트
        *
        *  /// <summary>
        *  /// 팝업그리드 뷰에서의 키이벤트
        *  /// </summary>
        *  /// <param name="sender">The source of the event.</param>
        *  /// <param name="e">The <see cref="System.Windows.Forms.KeyEventArgs"/> instance containing the event data.</param>
        *  private void PopupGridview_KeyDown(object sender, KeyEventArgs e)
        *  {
        *   try
        *   {
        *       if (e.KeyCode != Keys.Enter) return;
        *
        *       SetPopupGrid(sender);
        *
        *   }
        *   catch (Exception ex)
        *   {
        *
        *       Basic.ShowMessage(3, ex.Message);
        *   }
        *
        *  }
        #endregion
        *
        #region 팝업그리드 뷰에서의 더블클릭
        *  /// <summary>
        *  /// 팝업그리드 뷰에서의 더블클릭
        *  /// </summary>
        *  /// <param name="sender">The source of the event.</param>
        *  /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        *  private void PopupGridview_DoubleClick(object sender, EventArgs e)
        *  {
        *   try
        *   {
        *       SetPopupGrid(sender);
        *   }
        *   catch (Exception ex)
        *   {
        *
        *       Basic.ShowMessage(3, ex.Message);
        *   }
        *  }
        #endregion
        *
        #region 팝업그리드 이벤트시 해당 컨트롤값 셋팅
        *  /// <summary>
        *  /// 그리드 이벤트시 해당 컨트롤값 셋팅
        *  /// </summary>
        *  /// <param name="sender">그리드뷰.</param>
        *  /// <remarks>
        *  /// 그리드 뷰를 넘기는 이유는 팝업에디트가 1개 이상일대 어떤컨트롤에 바인딩 할 것인가를 비교하기 위해서
        *  /// </remarks>
        *  private void SetPopupGrid(object sender)
        *  {
        *
        *   try
        *   {
        *       DataRow r;
        *
        *       r = Cls.Common.uPopupContainer.GetSelectRow(this.popFacilitycode, 0);
        *
        *       if (this.popFacilitycode.Properties.PopupControl.OwnerEdit != null)
        *               this.popFacilitycode.Properties.PopupControl.OwnerEdit.ClosePopup();
        *
        *       if (r != null)
        *       {
        *           this.popFacilitycode.Text = r["FACILITY_CODE"].ToString() + " " + r["FACILITY_NAME"];
        *       }
        *       else
        *       {
        *           this.popFacilitycode.Text = "선택하세요";
        *           dt.Clear();
        *           dtCode.RejectChanges();
        *           dtCode.AcceptChanges();
        *           dtOption.Clear();
        *       }
        *
        *       Selects(true);
        *   }
        *   catch (Exception ex)
        *   {
        *
        *       throw ex;
        *   }
        *  }
        #endregion
        *
        #region 파업이 열렸을때
        *  private void popFacilitycode_Popup(object sender, EventArgs e)
        *  {
        *   try
        *   {
        *       ((GridView)((DevExpress.XtraGrid.GridControl)this.popFacilitycode.Properties.PopupControl.Controls[0]).MainView).ClearColumnsFilter();
        *   }
        *   catch(Exception ex)
        *   {
        *       Basic.ShowMessage(3, ex.Message);
        *   }
        *  }
        #endregion
        *****************************************************************************/
        #endregion

        #region 기초코드를 바인딩합니다.
        /// <summary>
        /// 기초코드를 바인딩합니다.
        /// </summary>
        private void SetBasicCodeBinding()
        {
            try
            {
                /*=====조회항목======*/
                //영업장
                DataTable dtBiz = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter);
                dtBiz.Rows.Add(new object[] { "V_BIZ_CODE", Parm.CurrentUserInformation.BizInfo.BizCode });
                DataSet dsTmp = DataLayer.ExecuteSpDataset("PKG_COMM.PR_02", dtBiz, DataLayer.MessageEncoding.Default);
                LookUp.SetFillCode(this.lupSrchFacilityCode, dsTmp.Tables[0], "FACILITY_NAME", "FACILITY_CODE", LookUp.CaptoinStyle.SelectText);

                //객실유형
                DataTable dtRoom = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter);
                dtRoom.Rows.Add(new object[] { "V_BIZ_CODE", Parm.CurrentUserInformation.BizInfo.BizCode });
                DataSet dsTmp1 = DataLayer.ExecuteSpDataset("PKG_COMM.PR_17", dtRoom, DataLayer.MessageEncoding.Default);
                LookUp.SetFillCode(this.lupSrchRoomType, dsTmp1.Tables[0], "ROOM_TYPE_NAME", "ROOM_TYPE", LookUp.CaptoinStyle.SelectText);

                //해지여부
                BasicCode.FillBasicCode(lupSrchCancelYn, "Z0000", BasicCode.BasicCodeReturnStyle.SelectStringCaption);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 11
0
 public LookUp Get(string code, long parentId, bool isDiffer)
 {
     try
     {
         LookUp lookup = new LookUp();
         try
         {
             using (LMJEntities db = new LMJEntities())
             {
                 lookup = db.LookUps
                          .Where(e => e.Code == code && e.ParentId == parentId && e.IsDeleted == false)
                          .FirstOrDefault();
             }
         }
         catch (Exception ex)
         {
             throw;
         }
         return(lookup);
     }
     catch (Exception ex)
     {
         throw;
     }
 }
Exemplo n.º 12
0
        /// <summary>
        /// 기초코드를 바인딩합니다.
        /// </summary>
        private void SetBasicCodeBinding()
        {
            try
            {
                string filter = string.Format("USE_YN = 'Y' AND PROJECT_ID = '{0}'", base.ProjectID);

                BizCommon.BasicCode.FillBasicCode(lupGuestTypeSelect, "Z0006", BizCommon.BasicCode.BasicCodeReturnStyle.SelectStringCaption);

                LookUp.SetFillCode(this.lupFacilitycodeSelect,
                                   Basic.GetdtSelect(BizCommon.Parm.mDataTable.dtZaa140ms, filter, "FACILITY_CODE ASC"),
                                   "FACILITY_NAME",
                                   "FACILITY_CODE",
                                   LookUp.CaptoinStyle.SelectText);


                BizCommon.BasicCode.FillBasicCode(lupGuestType, "Z0006", BizCommon.BasicCode.BasicCodeReturnStyle.SelectStringCaption);
                BizCommon.BasicCode.FillBasicCode(lupMenuitem1, "C0012", BizCommon.BasicCode.BasicCodeReturnStyle.SelectStringCaption);
                BizCommon.BasicCode.FillBasicCode(lupMenuitem2, "Z0010", BizCommon.BasicCode.BasicCodeReturnStyle.Default);

                LookUp.SetFillCode(this.lupFacilitycode,
                                   Basic.GetdtSelect(BizCommon.Parm.mDataTable.dtZaa140ms, filter, "FACILITY_CODE ASC"),
                                   "FACILITY_NAME",
                                   "FACILITY_CODE",
                                   LookUp.CaptoinStyle.SelectText);

                if (lupMenuitem2.EditValue != null)
                {
                    lupMenuitem2.ItemIndex = 0;
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 13
0
        private void SearchButton_Click(object sender, RoutedEventArgs e)
        {
            string filter    = " 1=1 ";
            int    pageCount = 0;
            ObservableCollection <object> paras = new System.Collections.ObjectModel.ObservableCollection <object>();   //参数值
            ComboBox cbxSystemType = Utility.FindChildControl <ComboBox>(expander, "cbxSystemType");
            //T_SYS_DICTIONARY dict = cbxSystemType.SelectedItem as T_SYS_DICTIONARY;
            //string systype = dict == null ? "" : dict.DICTIONARYVALUE.GetValueOrDefault().ToString();

            string parentid = "";

            LookUp           lkParentMenu = Utility.FindChildControl <LookUp>(expander, "lkParentMenu");
            T_SYS_ENTITYMENU menu         = lkParentMenu.DataContext as T_SYS_ENTITYMENU;

            if (!string.IsNullOrEmpty(StrSystemType))
            {
                filter += " && SYSTEMTYPE ==@" + paras.Count().ToString();
                paras.Add(StrSystemType);
            }
            if (menu != null)
            {
                parentid = menu.ENTITYMENUID;
                if (!string.IsNullOrEmpty(parentid))
                {
                    filter += " && T_SYS_ENTITYMENU2!=null && T_SYS_ENTITYMENU2.ENTITYMENUID ==@" + paras.Count().ToString();
                    paras.Add(parentid);
                }
            }
            SMT.Saas.Tools.PermissionWS.LoginUserInfo loginUserInfo = new SMT.Saas.Tools.PermissionWS.LoginUserInfo();
            loginUserInfo.companyID = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;
            loginUserInfo.userID    = Common.CurrentLoginUserInfo.EmployeeID;
            //loadbar.Start();
            RefreshUI(RefreshedTypes.ShowProgressBar);
            client.GetSysMenuByTypePagingAsync(0, 500, "ORDERNUMBER", filter, paras, pageCount, loginUserInfo);
        }
Exemplo n.º 14
0
        /// <summary>
        /// 컨트롤을 셋팅합니다.
        /// </summary>
        private void SetControlnitialize()
        {
            try
            {
                string filter = "FACILITY_TYPE = '10' AND USE_YN = 'Y' AND DIRECT_MANAGE_YN = 'Y'";
                LookUp.SetFillCode(this.lupFacilityCode,
                                   Basic.GetdtSelect(Parm.mDataTable.dtJaa010ms, filter, "FACILITY_CODE"),
                                   "FACILITY_NAME",
                                   "FACILITY_CODE",
                                   LookUp.CaptoinStyle.None
                                   );
                int cntf = int.Parse(Parm.mDataTable.dtJaa010ms.Compute("COUNT(FACILITY_CODE)", filter).ToString().Trim());
                if (cntf < 1)
                {
                    throw new Exception("등록된 객실영업장이 없습니다.");
                }
                string filter1 = filter + string.Format(" AND FACILITY_CODE = '{0}'", Parm.CurrentUserInformation.roomTask.gsDFacility);
                int    cnt     = int.Parse(Parm.mDataTable.dtJaa010ms.Compute("COUNT(FACILITY_CODE)", filter1).ToString().Trim());
                this.lupFacilityCode.EditValue = Parm.CurrentUserInformation.roomTask.gsDFacility;

                //영업장을 숨긴다
                this.lupFacilityCode.Visible = false;
                this.lblFacilityCode.Visible = false;

                //SetTabPage();  // 탭페이지 생성
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 15
0
        public List <LookUp> getPeople(short?personTypeFK)
        {
            List <LookUp> l = new List <LookUp>();

            using (SqlConnection conn = new SqlConnection(DBConnect.GetSchoolConnStr()))
            {
                using (SqlCommand cmd = conn.CreateCommand())
                {
                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.CommandText = "uspGetPeople";
                    if (personTypeFK != null)
                    {
                        cmd.Parameters.Add("@personTypeFK", SqlDbType.SmallInt).Value = personTypeFK;
                    }
                    conn.Open();
                    SqlDataReader rdr = cmd.ExecuteReader();

                    while (rdr.Read())
                    {
                        LookUp p = new LookUp();

                        p.keyfield = Convert.ToInt16(rdr["KeyField"].ToString());
                        p.name     = rdr["name"].ToString();
                        l.Add(p);
                    }
                }
                return(l);
            }
        }
Exemplo n.º 16
0
        public async Task <TaskCreateModel> AssignLookUps(IQueryable <Project> projects, TaskCreateModel model)
        {
            LookUp lookups = null;

            try
            {
                lookups = await _cacheHelper.CheckLookupCache(_cache);
            }
            catch (Exception ex)
            {
                var error = ex;
            }

            model.EffortDesc   = lookups.Efforts;
            model.ResourceDesc = lookups.Resources;
            model.StatusDesc   = lookups.Statuses;

            model.ProjectName = projects
                                .Select(y => new SelectListItem
            {
                Value = y.Id.ToString(),
                Text  = $"{y.Description}"
            });


            return(model);
        }
Exemplo n.º 17
0
        /// <summary>
        /// 选择班次
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void lkShiftName_FindClick(object sender, EventArgs e)
        {
            Dictionary <string, string> cols = new Dictionary <string, string>();

            cols.Add("SHIFTNAME", "SHIFTNAME");
            cols.Add("WORKTIME", "WORKTIME");
            LookupForm lookup = new LookupForm(SMT.Saas.Tools.OrganizationWS.EntityNames.ShiftDefine,
                                               typeof(T_HR_SHIFTDEFINE[]), cols);

            lookup.SelectedClick += (o, ev) =>
            {
                T_HR_SHIFTDEFINE ent         = lookup.SelectedObj as T_HR_SHIFTDEFINE;
                LookUp           lkShiftName = sender as LookUp;

                if (ent != null)
                {
                    lkShiftName.DataContext = ent;

                    if (lkDefaultShiftName.DataContext != null)
                    {
                        T_HR_SHIFTDEFINE entDefault = lkDefaultShiftName.DataContext as T_HR_SHIFTDEFINE;
                        if (ent.SHIFTDEFINEID != entDefault.SHIFTDEFINEID)
                        {
                            lkDefaultShiftName.DataContext = null;
                        }
                    }
                }
            };

            lookup.Show <string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { });
        }
Exemplo n.º 18
0
        /// <summary>
        /// 기초코드를 바인딩합니다.
        /// </summary>
        private void SetBasicCodeBinding()
        {
            try
            {
                string filter = string.Format("USE_YN = 'Y' AND PROJECT_ID = '{0}'", base.ProjectID);

                LookUp.SetFillCode(this.lupFacilitycodeSelect,
                                   Basic.GetdtSelect(BizCommon.Parm.mDataTable.dtZaa140ms, filter, "FACILITY_CODE ASC"),
                                   "FACILITY_NAME",
                                   "FACILITY_CODE",
                                   LookUp.CaptoinStyle.SelectText);


                //LookUp.SetFillCode(this.lupFacilitycode,
                //                   Basic.GetdtSelect(BizCommon.Parm.mDataTable.dtZaa140ms, filter, "FACILITY_CODE ASC"),
                //                   "FACILITY_NAME",
                //                   "FACILITY_CODE",
                //                   LookUp.CaptoinStyle.SelectText);

                this.dtpFrom.Properties.Mask.EditMask = "(1[9]|2[0-9])\\d\\d-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])";
                this.dtpTo.Properties.Mask.EditMask   = "(1[9]|2[0-9])\\d\\d-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])";

                this.dtpFrom.Properties.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.RegEx;
                this.dtpTo.Properties.Mask.MaskType   = DevExpress.XtraEditors.Mask.MaskType.RegEx;

                this.dtpFrom.EditValue = Convert.ToDateTime(Cls.Common.uDate.GetDateFromYYYY_MM_DD(Parm.CurrentUserInformation.roomTask.gsTaskDate)).AddMonths(-1);
                this.dtpTo.EditValue   = Convert.ToDateTime(Cls.Common.uDate.GetDateFromYYYY_MM_DD(Parm.CurrentUserInformation.roomTask.gsTaskDate));
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 19
0
        /// <summary>
        /// 컨트롤을 셋팅합니다.
        /// </summary>
        private void SetControlnitialize()
        {
            try
            {
                this.dtpFrom.Properties.Mask.EditMask = "(1[9]|2[0-9])\\d\\d-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]) ";
                this.dtpTo.Properties.Mask.EditMask   = "(1[9]|2[0-9])\\d\\d-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]) ";

                this.dtpFrom.Properties.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.RegEx;
                this.dtpTo.Properties.Mask.MaskType   = DevExpress.XtraEditors.Mask.MaskType.RegEx;

                this.dtpFrom.EditValue = DateTime.Now;
                this.dtpTo.EditValue   = DateTime.Now.AddDays(7);

                DataTable dtTmp = Basic.GetdtSelect(Parm.mDataTable.dtZx010ms, "HEAD = 'F0002' AND USE_YN = 'Y' AND DETAIL <> ' ' ", "ITEM1");

                LookUp.SetFillCode(this.lupFacilityType, dtTmp, "DETAIL_NAME", "ITEM1", LookUp.CaptoinStyle.SelectText);

                if (((DataTable)lupFacilityType.Properties.DataSource).Rows.Count <= 0)
                {
                    Basic.ShowMessage(1, "선택가능한 영업장타입이 없습니다.");
                    this.btnSelect.Enabled = false;
                    this.btnExecel.Enabled = false;
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 20
0
        /// <summary>
        /// 컨트롤을 셋팅합니다.
        /// </summary>
        private void SettingControl()
        {
            try
            {
                DataTable dtBiz = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter);
                dtBiz.Rows.Add(new object[] { "V_BIZ_CODE", Parm.CurrentUserInformation.BizInfo.BizCode });
                DataSet dsTmp = DataLayer.ExecuteSpDataset("PKG_CAAAI02.PR_03", dtBiz, DataLayer.MessageEncoding.Default);
                LookUp.SetFillCode(this.lupFactory, dsTmp.Tables[0], "FACILITY_NAME", "FACILITY_CODE", LookUp.CaptoinStyle.SelectText);

                if (dsTmp.Tables[0].Rows.Count > 0)
                {
                    this.lupFactory.EditValue = dsTmp.Tables[0].Rows[0]["FACILITY_CODE"].ToString().Trim();
                }

                this.dtpStart.EditValue = System.DateTime.Now;
                this.dtpEnd.EditValue   = System.DateTime.Now.AddDays(30);


                Cls.Common.uMask.SetMask(dtpStart, Parm.mMask.DATE);
                Cls.Common.uMask.SetMask(dtpEnd, Parm.mMask.DATE);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        public ValueDataResponse <LookUp> AddLookUpData(LookUp lookup)
        {
            ValueDataResponse <LookUp> response = new ValueDataResponse <LookUp>();

            try
            {
                var result = _appContext.LookUps.Add(lookup);
                _appContext.SaveChanges();

                if (result != null)
                {
                    response.Result          = lookup;
                    response.IsSuccess       = true;
                    response.AffectedRecords = 1;
                    response.EndUserMessage  = "LookUp Added Successfully";
                }
                else
                {
                    response.IsSuccess       = true;
                    response.AffectedRecords = 0;
                    response.EndUserMessage  = "LookUp Added Failed";
                }
            }
            catch (Exception ex)
            {
                response.IsSuccess       = false;
                response.AffectedRecords = 0;
                response.EndUserMessage  = ex.InnerException == null ? ex.Message : ex.InnerException.Message;
                response.Exception       = ex;
            }

            return(response);
        }
Exemplo n.º 22
0
        public bool UpdatePosition(string positionCode, long tableId, bool isAdd, long?recordId)
        {
            try
            {
                //delete
                if (!isAdd)
                {
                    //get position
                    LookUp position              = _LookUpAccessor.Get(positionCode, (long)recordId, false);
                    LookUpMultiLanguage multi    = new LookUpMultiLanguage();
                    LookUpMultiLanguage posMulti = new LookUpMultiLanguage();
                    posMulti = _LookUpMultiAccessor.Get(position.Id, 1);
                    List <LookUp> positions = _LookUpAccessor.GetList(tableId).Where(e => e.Code == positionCode && e.Id != position.Id && e.IsDeleted == false).ToList();

                    foreach (LookUp p in positions)
                    {
                        //get multi
                        multi = new LookUpMultiLanguage();
                        multi = _LookUpMultiAccessor.Get(p.Id, 1);

                        if (long.Parse(multi.Description) >= long.Parse(posMulti.Description))
                        {
                            //update
                            _LookUpMultiAccessor.EditDesription(multi.Id, (long.Parse(multi.Description) - 1).ToString());
                        }
                    }
                }
                else
                {
                    List <LookUp>       positions = _LookUpAccessor.GetList(tableId, positionCode);
                    LookUpMultiLanguage multi     = new LookUpMultiLanguage();

                    foreach (LookUp p in positions)
                    {
                        //get multi
                        multi = new LookUpMultiLanguage();
                        if (tableId == 26)
                        {
                            multi = _LookUpMultiAccessor.Get(p.Id, null);
                        }
                        else
                        {
                            multi = _LookUpMultiAccessor.Get(p.Id, 1);
                        }

                        _LookUpMultiAccessor.EditDesription(multi.Id, (long.Parse(multi.Description) + 1).ToString());
                    }
                }


                return(true);
            }
            catch (Exception ex)
            {
                return(false);

                throw;
            }
        }
Exemplo n.º 23
0
        public override async Task <ChatRooms> GetChatRooms(LookUp request, ServerCallContext context)
        {
            var result       = new ChatRooms();
            var allChatRooms = await _chatRepository.GetAll();

            result.ChatRooms_.AddRange(allChatRooms);
            return(result);
        }
Exemplo n.º 24
0
        public static INamingConvention GetInstanceOfNamingConvention()
        {
            var wordLookUp   = new LookUp(GetInstanceOfIStreamReader());
            var nameSplitter = new Splitter();
            var metric       = GetInstanceOfIMetric();

            return(new NamingConvention(wordLookUp, nameSplitter, metric));
        }
        public ActionResult DeleteConfirmed(int id)
        {
            LookUp lookUp = db.LookUps.Find(id);

            db.LookUps.Remove(lookUp);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemplo n.º 26
0
        public BundleSearch(Postgres postgres, OracleDB oracle, LookUp lookup)
        {
            this.postgres = postgres;
            this.oracle   = oracle;
            this.lookup   = lookup;

            InitializeComponent();
        }
Exemplo n.º 27
0
 public ActionResult SaveLeaveType(LookUp lookup)
 {
     lookup.LookUpCategory = UTILITY.CONFIG_EMPLOYEELEAVETYPE;
     lookup.BranchId       = BRANCHID;
     lookUpBO.Add(lookup);
     otherLeaveBo.AddLookUp(lookup);
     return(RedirectToAction("LeaveList"));
 }
Exemplo n.º 28
0
 public void AddToClose()
 {
     if (CheckRole())
     {
         if (rbtIsAutono.IsChecked == true)
         {
             if (string.IsNullOrEmpty(perm.PERMISSIONCODE))
             {
                 Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("WARING"), "权限编码不能为空");
                 return;
             }
             else
             {
                 perm.ISCOMMOM = "0";
             }
             LookUp           lkParentMenu = Utility.FindChildControl <LookUp>(expander, "lkParentMenu");
             T_SYS_ENTITYMENU menu         = lkParentMenu.DataContext as T_SYS_ENTITYMENU;
             if (menu != null)
             {
                 perm.T_SYS_ENTITYMENU = menu;
                 //perm.T_SYS_ENTITYMENUReference.EntityKey = menu.EntityKey;
                 perm.T_SYS_ENTITYMENU.ENTITYMENUID = menu.ENTITYMENUID;
             }
         }
         else
         {
             perm.ISCOMMOM       = "1";
             perm.PERMISSIONCODE = "";//是公共权限不设置编码
         }
         if (!string.IsNullOrEmpty(perm.PERMISSIONVALUE))
         {
             if (perm.PERMISSIONVALUE.IndexOf("-") > -1)
             {
                 Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("WARING"), "权限值不能为负数");
                 return;
             }
             try
             {
                 int IntValue = System.Int32.Parse(perm.PERMISSIONVALUE);
             }
             catch (Exception ex)
             {
                 Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("WARING"), "权限值必须为整数");
                 return;
             }
         }
         if (FormTypes.New == this.FormType)
         {
             client.SysPermissionAddAsync(perm);
         }
         else
         {
             client.SysPermissionUpdateAsync(perm);
         }
     }
 }
Exemplo n.º 29
0
        void CalculateView()
        {
            Rotation = Quaternion.CreateFromYawPitchRoll(AngleV, AngleH, 0);

            Forward = Vector3.Transform(VectorF, Rotation); Forward.Normalize();
            Side    = Vector3.Transform(VectorH, Rotation); Side.Normalize();
            LookUp  = Vector3.Transform(VectorV, Rotation); LookUp.Normalize();

            viewMatrix = Matrix.CreateLookAt(Position, Position + Forward, LookUp);
        }
Exemplo n.º 30
0
        private static LookUp MapLookUp(IDataReader reader)
        {
            LookUp lookUp = new LookUp();
            int    idx    = 0;

            lookUp.Id   = reader.GetSafeInt32(idx++);
            lookUp.Name = reader.GetSafeString(idx++);

            return(lookUp);
        }
Exemplo n.º 31
0
    public List<LookUp> getLookUps(string lookup_Name)
    {
        dl = new DataLayer(pConnectionString);
        SqlCommand cmd = new SqlCommand();
        cmd.CommandType = CommandType.StoredProcedure;
        cmd.CommandText = "usp_get_lookup_values";

        cmd.Parameters.AddWithValue("@lookup_Name", lookup_Name);

        DataTable dt = dl.Execute(cmd);

        List<LookUp> Lookups = new List<LookUp>();

        foreach (DataRow dr in dt.Rows)
        {
            LookUp lookup = new LookUp
            {
                lookup_id = dr["lookup_id"].ToString(),
                lookup_name = dr["lookup_name"].ToString().ToLower(),
                lookup_value = dr["lookup_value"].ToString().ToLower(),
                lookup_display_text = dr["lookup_display_text"].ToString().ToLower()
            };

            Lookups.Add(lookup);

        }
        return Lookups;
    }