Пример #1
0
        /// <summary>
        /// load when create user
        /// </summary>
        public FrmCreateUser(string userName)
        {
            COM_MESSAGE  = new CommonControls.Classes.ClsMessages();
            VALIDATION   = new CommonControls.Classes.ClsValidation();
            COMM_METHODS = new CommonControls.Classes.ClsCommonMethods();
            CREATEUSER   = new BLL.ClsUserManageData();
            MANAGEDB     = new BLL.ClsUserManageDbChanges();

            InitializeComponent();

            txt_userID.Text = MANAGEDB.getMaxUserID().ToString();
            //fill data of user role from db
            dropDown_userRole.DataSource     = MANAGEDB.getUserRoleList();
            dropDown_userRole.DisplayMember  = "userRoleName";
            dropDown_userRole.ValueMember    = "userRoleId";
            dropDown_userRole.BindingContext = this.BindingContext;
            dropDown_userRole.SelectedIndex  = -1;

            btn_create.Visible    = true;
            btn_update.Visible    = false;
            btn_delete.Visible    = false;
            btn_resetPass.Visible = false;

            USERNAME = userName;

            this.ActiveControl = txt_userName;
        }
Пример #2
0
        /// <summary>
        /// when Update
        /// </summary>
        /// <param name="singleItemDetails"></param>
        /// <param name="userName"></param>
        public FrmAddItem(BLL.ClsItemData singleItemDetails, string userName)
        {
            COM_MESSAGE  = new CommonControls.Classes.ClsMessages();
            VALIDATION   = new CommonControls.Classes.ClsValidation();
            COMM_METHODS = new CommonControls.Classes.ClsCommonMethods();
            CREATEITEM   = new BLL.ClsItemData();
            MANAGEDB     = new BLL.ClsMetaDataDbChanges();

            InitializeComponent();

            txt_itemID.Text      = singleItemDetails._itemId.ToString();
            txt_itemCode.Text    = singleItemDetails._itemCode.ToString();
            txt_altName.Text     = singleItemDetails._altName;
            txt_itemName.Text    = singleItemDetails._itemName;
            txt_itemCode.Enabled = false;

            filldropDownLists();
            dropDown_itemType.SelectedIndex  = dropDown_itemType.FindString(singleItemDetails._itemTypeName);
            dropDown_stockUnit.SelectedIndex = dropDown_stockUnit.FindString(singleItemDetails._stockUnitName);
            dropDown_shopUnit.SelectedIndex  = dropDown_shopUnit.FindString(singleItemDetails._shopUnitName);

            btn_cancel.Visible = true;
            btn_create.Visible = false;
            btn_delete.Visible = true;
            btn_update.Visible = true;

            IS_UPDATING = true;
            USERNAME    = userName;

            this.StartPosition = FormStartPosition.CenterScreen;
            this.ActiveControl = txt_itemCode;
        }
Пример #3
0
        public FrmAddUnits(BLL.ClsUnitData unit, string userName)
        {
            try
            {
                COM_MESSAGE  = new CommonControls.Classes.ClsMessages();
                VALIDATION   = new CommonControls.Classes.ClsValidation();
                COMM_METHODS = new CommonControls.Classes.ClsCommonMethods();
                ADD_UNIT     = new BLL.ClsUnitData();
                MANAGEDB     = new BLL.ClsMetaDataDbChanges();

                InitializeComponent();

                IS_UPDATING        = true;
                USERNAME           = userName;
                btn_cancel.Visible = true;
                btn_create.Visible = false;
                btn_delete.Visible = true;
                btn_update.Visible = true;

                fillData(unit);

                this.StartPosition = FormStartPosition.CenterScreen;
                this.ActiveControl = txt_description;
            }
            catch (Exception ex)
            {
                COM_MESSAGE.exceptionMessage(ex.Message);
            }
        }
Пример #4
0
        public FrmAddDealers(string userName)
        {
            try
            {
                COM_MESSAGE  = new CommonControls.Classes.ClsMessages();
                VALIDATION   = new CommonControls.Classes.ClsValidation();
                COMM_METHODS = new CommonControls.Classes.ClsCommonMethods();
                ADD_DEALER   = new BLL.ClsDealerData();
                MANAGEDB     = new BLL.ClsMetaDataDbChanges();

                InitializeComponent();

                USERNAME           = userName;
                btn_cancel.Visible = true;
                btn_create.Visible = true;
                btn_delete.Visible = false;
                btn_update.Visible = false;

                this.WindowState   = FormWindowState.Maximized;
                this.ActiveControl = txt_dealerName;
            }
            catch (Exception ex)
            {
                COM_MESSAGE.exceptionMessage(ex.Message);
            }
        }
Пример #5
0
        public FrmAddTax(string userName)
        {
            try
            {
                COM_MESSAGE  = new CommonControls.Classes.ClsMessages();
                VALIDATION   = new CommonControls.Classes.ClsValidation();
                COMM_METHODS = new CommonControls.Classes.ClsCommonMethods();
                ADD_TAX      = new BLL.ClsTaxData();
                MANAGEDB     = new BLL.ClsMetaDataDbChanges();

                InitializeComponent();

                USERNAME             = userName;
                btn_add.Visible      = true;
                btn_delete.Visible   = false;
                btn_update.Visible   = false;
                grp_duration.Enabled = false;
                IS_UPDATING          = false;
                IS_SUCCESS_MESSAGE   = false;

                this.WindowState   = FormWindowState.Maximized;
                this.ActiveControl = txt_symbol;
            }
            catch (Exception ex)
            {
                COM_MESSAGE.exceptionMessage(ex.Message);
            }
        }
Пример #6
0
        public FrmAddTax(BLL.ClsTaxData tax, string userName)
        {
            try
            {
                COM_MESSAGE  = new CommonControls.Classes.ClsMessages();
                VALIDATION   = new CommonControls.Classes.ClsValidation();
                COMM_METHODS = new CommonControls.Classes.ClsCommonMethods();
                ADD_TAX      = new BLL.ClsTaxData();
                MANAGEDB     = new BLL.ClsMetaDataDbChanges();

                InitializeComponent();

                IS_UPDATING        = true;
                USERNAME           = userName;
                btn_add.Visible    = false;
                btn_delete.Visible = true;
                btn_update.Visible = true;

                fillData(tax);

                this.StartPosition = FormStartPosition.CenterScreen;
                this.ActiveControl = txt_symbol;
            }
            catch (Exception ex)
            {
                COM_MESSAGE.exceptionMessage(ex.Message);
            }
        }
Пример #7
0
        /// <summary>
        /// when Update
        /// </summary>
        /// <param name="singleItemDetails"></param>
        /// <param name="userName"></param>
        public FrmAddItem(BLL.ClsItemData singleItemDetails, string userName)
        {
            COM_MESSAGE  = new CommonControls.Classes.ClsMessages();
            VALIDATION   = new CommonControls.Classes.ClsValidation();
            COMM_METHODS = new CommonControls.Classes.ClsCommonMethods();
            CREATEITEM   = new BLL.ClsItemData();
            MANAGEDB     = new BLL.ClsInventoryManageDbChanges();

            InitializeComponent();

            txt_itemID.Text      = singleItemDetails._itemId.ToString();
            txt_itemCode.Text    = singleItemDetails._itemCode.ToString();
            txt_altName.Text     = singleItemDetails._altName;
            txt_itemName.Text    = singleItemDetails._itemName;
            txt_itemCode.Enabled = false;

            dropDown_itemType.DataSource     = MANAGEDB.getItemTypeList();
            dropDown_itemType.DisplayMember  = "itemType";
            dropDown_itemType.ValueMember    = "typeId";
            dropDown_itemType.BindingContext = this.BindingContext;
            dropDown_itemType.SelectedIndex  = dropDown_itemType.FindString(singleItemDetails._itemTypeName);

            btn_cancel.Visible = true;
            btn_create.Visible = false;
            btn_delete.Visible = true;
            btn_update.Visible = true;

            IS_UPDATING = true;
            USERNAME    = userName;

            this.StartPosition = FormStartPosition.CenterScreen;
            this.ActiveControl = txt_itemCode;
        }
Пример #8
0
        /// <summary>
        /// when create item
        /// </summary>
        /// <param name="userName"></param>
        public FrmAddItem(string userName)
        {
            COM_MESSAGE  = new CommonControls.Classes.ClsMessages();
            VALIDATION   = new CommonControls.Classes.ClsValidation();
            COMM_METHODS = new CommonControls.Classes.ClsCommonMethods();
            CREATEITEM   = new BLL.ClsItemData();
            MANAGEDB     = new BLL.ClsInventoryManageDbChanges();

            InitializeComponent();

            txt_itemID.Text = MANAGEDB.getMaxItemId().ToString();
            //fill data for itemType from db
            dropDown_itemType.DataSource     = MANAGEDB.getItemTypeList();
            dropDown_itemType.DisplayMember  = "itemType";
            dropDown_itemType.ValueMember    = "typeId";
            dropDown_itemType.BindingContext = this.BindingContext;
            dropDown_itemType.SelectedIndex  = -1;

            USERNAME = userName;

            btn_cancel.Visible = true;
            btn_create.Visible = true;
            btn_delete.Visible = false;
            btn_update.Visible = false;

            this.WindowState   = FormWindowState.Maximized;
            this.ActiveControl = txt_itemCode;
        }
Пример #9
0
        public FrmCreateUser()
        {
            COM_MESSAGE = new CommonControls.Classes.ClsMessages();
            CONNECTION  = new CommonControls.Classes.dbConnection();
            VALIDATION  = new CommonControls.Classes.ClsValidation();
            CREATEUSER  = new CommonControls.Classes.CreateUser();

            InitializeComponent();
        }
Пример #10
0
        public frm_Login()
        {
            InitializeComponent();
            CONN         = new CommonControls.Classes.dbConnection();
            COMMON       = new CommonControls.Classes.ClsCommonMethods();
            COMM_MESSAGE = new CommonControls.Classes.ClsMessages();
            VALIDATION   = new CommonControls.Classes.ClsValidation();

            this.ActiveControl = txtUserName;
        }
Пример #11
0
        public FrmAdjustStock(string userName)
        {
            COM_MESSAGE  = new CommonControls.Classes.ClsMessages();
            VALIDATION   = new CommonControls.Classes.ClsValidation();
            COMM_METHODS = new CommonControls.Classes.ClsCommonMethods();
            STOCKDATA    = new BLL.ClsStockData();
            MANAGEDB     = new BLL.ClsInventoryManageDbChanges();

            InitializeComponent();

            this.WindowState   = FormWindowState.Maximized;
            this.ActiveControl = txt_itemCode;
        }
Пример #12
0
        public FrmAddUserRole(string userName)
        {
            COM_MESSAGE  = new CommonControls.Classes.ClsMessages();
            VALIDATION   = new CommonControls.Classes.ClsValidation();
            COMM_METHODS = new CommonControls.Classes.ClsCommonMethods();
            MANAGEDB     = new BLL.ClsUserManageDbChanges();

            InitializeComponent();

            USERNAME           = userName;
            btn_update.Visible = false;
            btn_add.Visible    = true;
        }
Пример #13
0
        public FrmStockIntake(BLL.ClsStockData stockData, string userName)
        {
            COM_MESSAGE  = new CommonControls.Classes.ClsMessages();
            VALIDATION   = new CommonControls.Classes.ClsValidation();
            COMM_METHODS = new CommonControls.Classes.ClsCommonMethods();
            STOCKDATA    = new BLL.ClsStockData();
            MANAGEDB     = new BLL.ClsInventoryManageDbChanges();

            InitializeComponent();

            IS_UPDATING = true;
            USERNAME    = userName;

            this.StartPosition = FormStartPosition.CenterScreen;
            this.ActiveControl = txt_itemCode;
        }
Пример #14
0
        public FrmStockIntake(string userName)
        {
            COM_MESSAGE  = new CommonControls.Classes.ClsMessages();
            VALIDATION   = new CommonControls.Classes.ClsValidation();
            COMM_METHODS = new CommonControls.Classes.ClsCommonMethods();
            STOCKDATA    = new BLL.ClsStockData();
            MANAGEDB     = new BLL.ClsInventoryManageDbChanges();

            InitializeComponent();

            dateTime_stockEntry.Value = DateTime.Today;
            USERNAME = userName;
            fillGrid();

            this.WindowState   = FormWindowState.Maximized;
            this.ActiveControl = txt_itemCode;
        }
Пример #15
0
        public FrmAddItemType(BLL.ClsItemTypeData itemType, string userName)
        {
            COM_MESSAGE  = new CommonControls.Classes.ClsMessages();
            VALIDATION   = new CommonControls.Classes.ClsValidation();
            COMM_METHODS = new CommonControls.Classes.ClsCommonMethods();
            MANAGEDB     = new BLL.ClsInventoryManageDbChanges();
            USERNAME     = userName;

            InitializeComponent();

            txt_itemTypeID.Text = itemType._itemTypeId.ToString();
            txt_itemType.Text   = itemType._itemTypeName;

            IS_UPDATING        = true;
            btn_update.Visible = true;
            btn_add.Visible    = false;
            this.StartPosition = FormStartPosition.CenterScreen;
            this.ActiveControl = txt_itemType;
        }
Пример #16
0
        public FrmReleaseStock(BLL.ClsReleaseStock releseStockData, string userName)
        {
            COM_MESSAGE  = new CommonControls.Classes.ClsMessages();
            VALIDATION   = new CommonControls.Classes.ClsValidation();
            COMM_METHODS = new CommonControls.Classes.ClsCommonMethods();
            STOCKDATA    = new BLL.ClsReleaseStock();
            MANAGEDB     = new BLL.ClsInventoryManageDbChanges();

            InitializeComponent();

            IS_UPDATING = true;
            USERNAME    = userName;

            this.StartPosition = FormStartPosition.CenterScreen;
            this.ActiveControl = txt_itemCode;

            btn_add.Visible     = false;
            btn_Cancel.Visible  = true;
            btn_clear.Visible   = true;
            btn_release.Visible = false;
        }
Пример #17
0
        public FrmAddDealers(BLL.ClsDealerData dealerDetails, string userName)
        {
            COM_MESSAGE  = new CommonControls.Classes.ClsMessages();
            VALIDATION   = new CommonControls.Classes.ClsValidation();
            COMM_METHODS = new CommonControls.Classes.ClsCommonMethods();
            ADD_DEALER   = new BLL.ClsDealerData();
            MANAGEDB     = new BLL.ClsMetaDataDbChanges();

            InitializeComponent();

            IS_UPDATING        = true;
            USERNAME           = userName;
            btn_cancel.Visible = true;
            btn_create.Visible = false;
            btn_delete.Visible = true;
            btn_update.Visible = true;

            fillData(dealerDetails);

            this.StartPosition = FormStartPosition.CenterScreen;
            this.ActiveControl = txt_dealerName;
        }
Пример #18
0
        public FrmReleaseStock(string userName)
        {
            COM_MESSAGE  = new CommonControls.Classes.ClsMessages();
            VALIDATION   = new CommonControls.Classes.ClsValidation();
            COMM_METHODS = new CommonControls.Classes.ClsCommonMethods();
            STOCKDATA    = new BLL.ClsReleaseStock();
            MANAGEDB     = new BLL.ClsInventoryManageDbChanges();

            InitializeComponent();

            dt_delivery.Value = DateTime.Today;
            USERNAME          = userName;

            this.WindowState   = FormWindowState.Maximized;
            this.ActiveControl = btn_selectDestination;

            txt_billAmt.Text    = 0.ToString();
            dt_delivery.MinDate = DateTime.Today;
            btn_add.Visible     = true;
            btn_Cancel.Visible  = false;
            btn_clear.Visible   = true;
            btn_release.Visible = true;
        }
Пример #19
0
        /// <summary>
        /// load when edit user
        /// </summary>
        /// <param name="singleUserDetails"></param>
        public FrmCreateUser(BLL.ClsUserManageData singleUserDetails, string userName)
        {
            COM_MESSAGE  = new CommonControls.Classes.ClsMessages();
            VALIDATION   = new CommonControls.Classes.ClsValidation();
            COMM_METHODS = new CommonControls.Classes.ClsCommonMethods();
            CREATEUSER   = new BLL.ClsUserManageData();
            MANAGEDB     = new BLL.ClsUserManageDbChanges();

            InitializeComponent();

            txt_userID.Text      = singleUserDetails._userId.ToString();
            txt_userName.Text    = singleUserDetails._userName;
            txt_firstName.Text   = singleUserDetails._firstName;
            txt_lastName.Text    = singleUserDetails._lastName;
            txt_dob.Text         = singleUserDetails._dob.ToString("yyyy/MM/dd");
            txt_email.Text       = singleUserDetails._email;
            txt_address.Text     = singleUserDetails._address;
            txt_nic.Text         = singleUserDetails._idNumber;
            txt_phoneNumber.Text = singleUserDetails._phoneNo.ToString();
            txt_userName.Enabled = false;

            dropDown_userRole.DataSource     = MANAGEDB.getUserRoleList();
            dropDown_userRole.DisplayMember  = "userRoleName";
            dropDown_userRole.ValueMember    = "userRoleId";
            dropDown_userRole.BindingContext = this.BindingContext;
            dropDown_userRole.SelectedIndex  = dropDown_userRole.FindString(singleUserDetails._userRole);  //singleUserDetails._roleId;

            btn_create.Visible    = false;
            btn_update.Visible    = true;
            btn_delete.Visible    = true;
            btn_resetPass.Visible = true;

            IS_UPDATING = true;
            USERNAME    = userName;

            this.ActiveControl = txt_firstName;
        }