예제 #1
0
파일: User.cs 프로젝트: WIXBAYS/POS_System
        public int updatetUser(String NIC, Boolean STATUS, String FIRST_NAME, String LAST_NAME, String CONTACT_NO, String ADDRESS_NO, String STREET, String CITY, String DISTRICT, int STORE_ID)
        {
            String selectCommand = "UPDATE [dbo].[User_Details] SET  [STATUS] = @STATUS ,[FIRST_NAME] = @FIRST_NAME  ,[LAST_NAME] = @LAST_NAME ,[CONTACT_NO] = @CONTACT_NO  ,[ADDRESS_NO] = @ADDRESS_NO ,[STREET] = @STREET ,[CITY] = @CITY  ,[DISTRICT] = @DISTRICT ,[STORE_ID] = @STORE_ID WHERE [NIC]=@NIC";

            SqlParameter[] sqlParams = new SqlParameter[] {
                new SqlParameter("@NIC", SqlDbType.Char),
                new SqlParameter("@STATUS", SqlDbType.Bit),
                new SqlParameter("@FIRST_NAME", SqlDbType.Char),
                new SqlParameter("@LAST_NAME", SqlDbType.Char),
                new SqlParameter("@CONTACT_NO", SqlDbType.Char),
                new SqlParameter("@ADDRESS_NO", SqlDbType.Char),
                new SqlParameter("@STREET", SqlDbType.Char),
                new SqlParameter("@CITY", SqlDbType.Char),
                new SqlParameter("@DISTRICT", SqlDbType.Char),
                new SqlParameter("@STORE_ID", SqlDbType.Int),
            };

            sqlParams[0].Value = NIC;
            sqlParams[1].Value = STATUS;
            sqlParams[2].Value = FIRST_NAME;
            sqlParams[3].Value = LAST_NAME;
            sqlParams[4].Value = CONTACT_NO;
            sqlParams[5].Value = ADDRESS_NO;
            sqlParams[6].Value = STREET;
            sqlParams[7].Value = CITY;
            sqlParams[8].Value = DISTRICT;
            sqlParams[9].Value = STORE_ID;



            DataUpdateManager dum = new DataUpdateManager();

            return(dum.updateRecord(selectCommand, ref sqlParams));
        }
예제 #2
0
        public int RecallItem(Boolean TRANSACTION_STATUS, int TRANSACTION_ID)
        {
            String query = "UPDATE [dbo].[Transaction]  SET  [TRANSACTION_STATUS] = @TRANSACTION_STATUS  WHERE [TRANSACTION_ID]=@TRANSACTION_ID";

            SqlParameter[] sqlParams = new SqlParameter[] {
                new SqlParameter("@TRANSACTION_STATUS", SqlDbType.Bit),
                new SqlParameter("@TRANSACTION_ID", SqlDbType.Int),
            };
            sqlParams[0].Value = TRANSACTION_STATUS;
            sqlParams[1].Value = TRANSACTION_ID;

            DataUpdateManager dum = new DataUpdateManager();

            return(dum.updateRecord(query, ref sqlParams));
        }
예제 #3
0
        public int UpdateStockBalance(int ITEMCAT_ID, decimal CAT_QUANTITY)
        {
            String selectCommand = "UPDATE [dbo].[Stock_Balance] SET  [BALANCE] = (BALANCE + @CAT_QUANTITY) WHERE [ITEMCAT_ID] =@ITEMCAT_ID";

            SqlParameter[] sqlParams = new SqlParameter[] {
                new SqlParameter("@ITEMCAT_ID", SqlDbType.Int),
                new SqlParameter("@CAT_QUANTITY", SqlDbType.Decimal),
            };

            sqlParams[0].Value = ITEMCAT_ID;
            sqlParams[1].Value = CAT_QUANTITY;

            DataUpdateManager dum = new DataUpdateManager();

            return(dum.updateRecord(selectCommand, ref sqlParams));
        }
예제 #4
0
        public int updateVoucher(int ID, int INVOICE_ID)
        {
            String Command = "UPDATE [dbo].[Voucher]  SET  [VOUCHER_STATUS] = '1'  ,[INVOICE_ID] = @INVOICE_ID WHERE [ID] =@ID";

            SqlParameter[] sqlParams = new SqlParameter[] {
                new SqlParameter("@ID", SqlDbType.Int),
                new SqlParameter("@INVOICE_ID", SqlDbType.Int)
            };

            sqlParams[0].Value = ID;
            sqlParams[1].Value = INVOICE_ID;



            DataUpdateManager dum = new DataUpdateManager();

            return(dum.updateRecord(Command, ref sqlParams));
        }
예제 #5
0
파일: User.cs 프로젝트: WIXBAYS/POS_System
        public int updatetPassword(String PASSWORD, String USER_NAME, String USER_TYPE)
        {
            String selectCommand = "UPDATE [dbo].[User_Details] SET  [PASSWORD] = @PASSWORD, [USER_TYPE]=@USER_TYPE  WHERE [USER_NAME]=@USER_NAME";

            SqlParameter[] sqlParams = new SqlParameter[] {
                new SqlParameter("@PASSWORD", SqlDbType.Char),
                new SqlParameter("@USER_NAME", SqlDbType.Char),
                new SqlParameter("@USER_TYPE", SqlDbType.Char),
            };

            sqlParams[0].Value = PASSWORD;
            sqlParams[1].Value = USER_NAME;
            sqlParams[2].Value = USER_TYPE;


            DataUpdateManager dum = new DataUpdateManager();

            return(dum.updateRecord(selectCommand, ref sqlParams));
        }
예제 #6
0
        public int updateBrand(String Name, String Discription, Boolean Brand_STATUS, String Brand_ID)
        {
            String selectCommand = "UPDATE [dbo].[Brand] SET [BRAND_NAME] = @BRAND_NAME ,[BRAND_DISCRIPTION] = @BRAND_DISCRIPTION ,[BRAND_STATUS] = @BRAND_STATUS WHERE [BRAND_ID] = @BRAND_ID";

            SqlParameter[] sqlParams = new SqlParameter[] {
                new SqlParameter("@BRAND_NAME", SqlDbType.VarChar),
                new SqlParameter("@BRAND_DISCRIPTION", SqlDbType.VarChar),
                new SqlParameter("@BRAND_STATUS", SqlDbType.Bit),
                new SqlParameter("@BRAND_ID", SqlDbType.Int)
            };

            sqlParams[0].Value = Name;
            sqlParams[1].Value = Discription;
            sqlParams[2].Value = Brand_STATUS;
            sqlParams[3].Value = Brand_ID;

            DataUpdateManager dum = new DataUpdateManager();

            return(dum.updateRecord(selectCommand, ref sqlParams));
        }
예제 #7
0
파일: Item.cs 프로젝트: WIXBAYS/POS_System
        public int updateItem(String Name, String Discription, Boolean ItemStatus, String Item_ID)
        {
            String selectCommand = "UPDATE [dbo].[Items] SET [ITEM_NAME] = @ITEM_NAME ,[ITEM_DISCRIPTION] = @Item_Discription ,[ITEM_STATUS] = @ItemStatus WHERE [ITEM_ID] = @Item_ID";

            SqlParameter[] sqlParams = new SqlParameter[] {
                new SqlParameter("@ITEM_NAME", SqlDbType.VarChar),
                new SqlParameter("@Item_Discription", SqlDbType.VarChar),
                new SqlParameter("@ItemStatus", SqlDbType.Bit),
                new SqlParameter("@Item_ID", SqlDbType.Int)
            };

            sqlParams[0].Value = Name;
            sqlParams[1].Value = Discription;
            sqlParams[2].Value = ItemStatus;
            sqlParams[3].Value = Item_ID;

            DataUpdateManager dum = new DataUpdateManager();

            return(dum.updateRecord(selectCommand, ref sqlParams));
        }
예제 #8
0
파일: Item.cs 프로젝트: WIXBAYS/POS_System
        public int updateItemCategory(String Category_NAME, String BRAND_ID, String Barcode_No, String Unit, Decimal Buying, Decimal Selling, String Item_Discription, Boolean ItemStatus, String Catagory_ID, Decimal Discount, String Discount_Type, String Item_ID, String Category_NAME_UNICODE)
        {
            String selectCommand = "UPDATE [dbo].[Item_Category] SET [CATEGORY_NAME] = N'" + Category_NAME + "', [BRAND_ID] = @BRAND_ID, BARCODE = @Barcode_No, [UNIT] = @Unit, [BUYING_COST] = @Buying, [SELLING_COST]= @Selling ,[CAT_DISCRIPTION] = @Catagory_Discription ,[CAT_STATUS] = @ItemStatus , [UPDATED_DATE] = @UpdateddDate, [DISCOUNT]=@DISCOUNT, [DISCOUNT_TYPE]=@DISCOUNT_TYPE, [ITEM_ID]=@ITEM_ID,  [CATEGORY_NAME_UNICODE] = N'" + Category_NAME_UNICODE + "' WHERE [ITEMCAT_ID] = @Catagory_ID";

            SqlParameter[] sqlParams = new SqlParameter[] {
                new SqlParameter("@Category_NAME", SqlDbType.Text),
                new SqlParameter("@BRAND_ID", SqlDbType.Int),
                new SqlParameter("@Barcode_No", SqlDbType.VarChar),
                new SqlParameter("@Unit", SqlDbType.Text),
                new SqlParameter("@Buying", SqlDbType.Decimal),
                new SqlParameter("@Selling", SqlDbType.Decimal),
                new SqlParameter("@Catagory_Discription", SqlDbType.VarChar),
                new SqlParameter("@ItemStatus", SqlDbType.Bit),
                new SqlParameter("@UpdateddDate", SqlDbType.DateTime),
                new SqlParameter("@Catagory_ID", SqlDbType.Int),
                new SqlParameter("@DISCOUNT", SqlDbType.Decimal),
                new SqlParameter("@DISCOUNT_TYPE", SqlDbType.VarChar),
                new SqlParameter("@ITEM_ID", SqlDbType.Int),
                new SqlParameter("@CATEGORY_NAME_UNICODE", SqlDbType.VarChar)
            };

            sqlParams[0].Value  = Category_NAME;
            sqlParams[1].Value  = BRAND_ID;
            sqlParams[2].Value  = Barcode_No;
            sqlParams[3].Value  = Unit;
            sqlParams[4].Value  = Buying;
            sqlParams[5].Value  = Selling;
            sqlParams[6].Value  = Item_Discription;
            sqlParams[7].Value  = ItemStatus;
            sqlParams[8].Value  = DateTime.Now;
            sqlParams[9].Value  = Catagory_ID;
            sqlParams[10].Value = Discount;
            sqlParams[11].Value = Discount_Type;
            sqlParams[12].Value = Item_ID;
            sqlParams[13].Value = Category_NAME_UNICODE;

            DataUpdateManager dum = new DataUpdateManager();

            return(dum.updateRecord(selectCommand, ref sqlParams));
        }
예제 #9
0
파일: Item.cs 프로젝트: WIXBAYS/POS_System
        public int updateDiscount(Decimal DISCOUNT, String DISCOUNT_TYPE, DateTime DISCOUNT_FROM, DateTime DISCOUNT_TO, Boolean DISCOUNT_PERIOADICALLY, String ITEMCAT_ID)
        {
            String selectCommand = "UPDATE [dbo].[Item_Category] SET [DISCOUNT] = @DISCOUNT ,[DISCOUNT_TYPE] = @DISCOUNT_TYPE ,[DISCOUNT_FROM] = @DISCOUNT_FROM ,[DISCOUNT_TO] = @DISCOUNT_TO ,[DISCOUNT_PERIOADICALLY] = @DISCOUNT_PERIOADICALLY WHERE [ITEMCAT_ID]=@ITEMCAT_ID";

            SqlParameter[] sqlParams = new SqlParameter[] {
                new SqlParameter("@DISCOUNT", SqlDbType.Decimal),
                new SqlParameter("@DISCOUNT_TYPE", SqlDbType.VarChar),
                new SqlParameter("@DISCOUNT_FROM", SqlDbType.DateTime),
                new SqlParameter("@DISCOUNT_TO", SqlDbType.DateTime),
                new SqlParameter("@DISCOUNT_PERIOADICALLY", SqlDbType.Bit),
                new SqlParameter("@ITEMCAT_ID", SqlDbType.Int)
            };

            sqlParams[0].Value = DISCOUNT;
            sqlParams[1].Value = DISCOUNT_TYPE;
            sqlParams[2].Value = DISCOUNT_FROM;
            sqlParams[3].Value = DISCOUNT_TO;
            sqlParams[4].Value = DISCOUNT_PERIOADICALLY;
            sqlParams[5].Value = ITEMCAT_ID;

            DataUpdateManager dum = new DataUpdateManager();

            return(dum.updateRecord(selectCommand, ref sqlParams));
        }