Esempio n. 1
0
        public Boolean updateStockItem(stockitem sitem, stockitem prevsitem)
        {
            Boolean status   = true;
            string  utString = "";

            try
            {
                string updateSQL = "update StockItem set " +
                                   "Name='" + sitem.Name +
                                   "', Level1Gcode='" + sitem.Group1Code +
                                   "', Level2Gcode='" + sitem.Group2Code +
                                   "', Level3Gcode='" + sitem.Group3Code +
                                   "', Level4Gcode='" + sitem.Group4Code +
                                   "', Level5Gcode='" + sitem.Group5Code +
                                   "', Level6Gcode='" + sitem.Group6Code +
                                   "', Unit='" + sitem.Unit +
                                   "', ReorderLevel=" + sitem.ReorderLevel +
                                   ", ForwarderList='" + sitem.ForwarderList + "'" +
                                   " where StockItemID='" + prevsitem.StockItemID + "'";
                utString = utString + updateSQL + Main.QueryDelimiter;
                utString = utString +
                           ActivityLogDB.PrepareActivityLogQquerString("update", "StockItem", "", updateSQL) +
                           Main.QueryDelimiter;
                if (!UpdateTable.UT(utString))
                {
                    status = false;
                }
            }
            catch (Exception)
            {
                status = false;
            }
            return(status);
        }
Esempio n. 2
0
        public Boolean updateUserPassword(string userID, string Password)
        {
            Boolean status   = true;
            string  utString = "";

            try
            {
                string updateSQL = "update ERPUser set Password='******'" +
                                   " where UserID='" + userID + "'";
                utString = utString + updateSQL + Main.QueryDelimiter;
                utString = utString +
                           ActivityLogDB.PrepareActivityLogQquerString("update", "ERPUser", "", updateSQL) +
                           Main.QueryDelimiter;
                if (!UpdateTable.UT(utString))
                {
                    status = false;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(this.ToString() + "-" + System.Reflection.MethodBase.GetCurrentMethod().Name + "() : Error");
                status = false;
            }
            return(status);
        }
Esempio n. 3
0
        public static Boolean updateEmpPosting(string rowid, employeeposting empPost)
        {
            Boolean status   = true;
            string  utString = "";

            try
            {
                SqlConnection con   = new SqlConnection(Login.connString);
                string        query = "update EmployeePosting set" +
                                      " PostingDate='" + (empPost.postingDate.ToString("yyyyMMdd")) + "'," +
                                      " OfficeID='" + empPost.officeID + "'," +
                                      " Department='" + empPost.departmentID + "'," +
                                      " Remarks='" + empPost.remarks + "'," +
                                      " Status=" + empPost.Status +
                                      " , ReportingOfficerID = '" + empPost.ReportingOfficer + "'" +
                                      " where RowID=" + rowid + "";
                SqlCommand cmd = new SqlCommand(query, con);
                con.Open();
                //cmd.Parameters.Add("@emp.empPicture", emp.empPicture);
                utString = utString + query + Main.QueryDelimiter;
                utString = utString +
                           ActivityLogDB.PrepareActivityLogQquerString("update", "EmployeePosting", "", query) +
                           Main.QueryDelimiter;
                if (!UpdateTable.UT(utString))
                {
                    status = false;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(System.Reflection.MethodBase.GetCurrentMethod().Name + "() : Error");
                status = false;
            }
            return(status);
        }
Esempio n. 4
0
        public Boolean updateProjectHeader(projectheader pheader, projectheader prevpheader)
        {
            Boolean status   = true;
            string  utString = "";

            try
            {
                string updateSQL = "update ProjectHeader set   CustomerID='" + pheader.CustomerID + "'" +
                                   ", Status=" + pheader.Status +
                                   ", ProjectID ='" + pheader.ProjectID +
                                   "', OfficeID ='" + pheader.OfficeID +
                                   "', ProjectManager='" + pheader.ProjectManager +
                                   "', StartDate='" + pheader.StartDate.ToString("yyyy-MM-dd") +
                                   "', TargetDate='" + pheader.TargetDate.ToString("yyyy-MM-dd") +
                                   "', ShortDescription='" + pheader.ShortDescription +
                                   "', ForwarderList='" + pheader.ForwarderList +
                                   "' where DocumentID='" + prevpheader.DocumentID +
                                   "' and TemporaryNo=" + prevpheader.TemporaryNo +
                                   " and TemporaryDate='" + prevpheader.TemporaryDate.ToString("yyyy-MM-dd") + "'";
                utString = utString + updateSQL + Main.QueryDelimiter;
                utString = utString +
                           ActivityLogDB.PrepareActivityLogQquerString("update", "ProjectHeader", "", updateSQL) +
                           Main.QueryDelimiter;
                if (!UpdateTable.UT(utString))
                {
                    status = false;
                }
            }
            catch (Exception)
            {
                status = false;
            }
            return(status);
        }
Esempio n. 5
0
        public Boolean ApproveProjectHeader(projectheader prevpheader)
        {
            Boolean status   = true;
            string  utString = "";

            try
            {
                string updateSQL = "update ProjectHeader set DocumentStatus=99" +
                                   ", Status=1" +
                                   ", ApproveUser='******'" +
                                   ", TrackingNo=" + prevpheader.TrackingNo +
                                   ", TrackingDate=convert(date, getdate())" +
                                   " where DocumentID='" + prevpheader.DocumentID +
                                   "' and TemporaryNo=" + prevpheader.TemporaryNo +
                                   " and TemporaryDate='" + prevpheader.TemporaryDate.ToString("yyyy-MM-dd") + "'";
                utString = utString + updateSQL + Main.QueryDelimiter;
                utString = utString +
                           ActivityLogDB.PrepareActivityLogQquerString("approve", "ProjectHeader", "", updateSQL) +
                           Main.QueryDelimiter;
                if (!UpdateTable.UT(utString))
                {
                    status = false;
                }
            }
            catch (Exception)
            {
                status = false;
            }
            return(status);
        }
 public Boolean updatePRHeader(purchasereturnheader prh)
 {
     Boolean status = true;
     string utString = "";
     try
     {
         string updateSQL = "update PurchaseReturnHeader set CustomerID='" + prh.CustomerID +
             "',MRNNo='" + prh.MRNNo +
              "',MRNDate='" + prh.MRNDate.ToString("yyyy-MM-dd") +
         
             "', ProductValue='" + prh.ProductValue +
             "', TaxAmount='" + prh.TaxAmount +
              "', PurchaseReturnValue='" + prh.PRValue +
             "', Remarks='" + prh.Remarks +
             "', Comments='" + prh.Comments +
              "', CommentStatus='" + prh.CommentStatus +
             "', ForwarderList='" + prh.ForwarderList + "'" +
             " where DocumentID='" + prh.DocumentID + "'" +
             " and TemporaryNo=" + prh.TemporaryNo +
             " and TemporaryDate='" + prh.TemporaryDate.ToString("yyyy-MM-dd") + "'";
         utString = utString + updateSQL + Main.QueryDelimiter;
         utString = utString +
         ActivityLogDB.PrepareActivityLogQquerString("update", "PurchaseReturnHeader", "", updateSQL) +
         Main.QueryDelimiter;
         if (!UpdateTable.UT(utString))
         {
             status = false;
         }
     }
     catch (Exception)
     {
         status = false;
     }
     return status;
 }
        public Boolean ApprovePR(purchasereturnheader prh)
        {
            Boolean status = true;
            string utString = "";
            try
            {
                string updateSQL = "update PurchaseReturnHeader set DocumentStatus=99, status=1 " +
                    ", ApproveUser='******'" +
                    ", commentStatus='" + prh.CommentStatus + "'" +
                    ", PurchaseReturnNo=" + prh.MRNNo +
                    ", PurchaseReturnDate=convert(date, getdate())" +
                    " where DocumentID='" + prh.DocumentID + "'" +
                    " and TemporaryNo=" + prh.TemporaryNo +
                    " and TemporaryDate='" + prh.TemporaryDate.ToString("yyyy-MM-dd") + "'";
                utString = utString + updateSQL + Main.QueryDelimiter;
                utString = utString +
                ActivityLogDB.PrepareActivityLogQquerString("update", "PurchaseReturnHeader", "", updateSQL) +
                Main.QueryDelimiter;

                if (!UpdateTable.UT(utString))
                {
                    status = false;
                }
            }
            catch (Exception)
            {
                status = false;
            }
            return status;
        }
Esempio n. 8
0
        public Boolean updateSystemParam(systemparam sp)
        {
            Boolean status   = true;
            string  utString = "";
            string  date     = "";

            try
            {
                string updateSQL = "update SystemParameters set Value='" + sp.Value + "', " +
                                   " Description ='" + sp.description + "' where " +
                                   " RowID='" + sp.rowid + "' and ID='" + sp.ID + "'";
                utString = utString + updateSQL + Main.QueryDelimiter;
                utString = utString +
                           ActivityLogDB.PrepareActivityLogQquerString("update", "SystemParameters", "", updateSQL) +
                           Main.QueryDelimiter;
                if (!UpdateTable.UT(utString))
                {
                    status = false;
                }
            }
            catch (Exception)
            {
                MessageBox.Show(this.ToString() + "-" + System.Reflection.MethodBase.GetCurrentMethod().Name + "() : Error");
                status = false;
            }
            return(status);
        }
Esempio n. 9
0
        public Boolean insertSyatemParam(systemparam sp)
        {
            Boolean status   = true;
            string  utString = "";

            try
            {
                string updateSQL = "insert into SystemParameters " +
                                   "(ID,Value,Description)" +
                                   " values (" +
                                   "'" + sp.ID + "'," +
                                   "'" + sp.Value + "'," +
                                   "'" + sp.description + "')";
                utString = utString + updateSQL + Main.QueryDelimiter;
                utString = utString +
                           ActivityLogDB.PrepareActivityLogQquerString("insert", "SystemParameters", "", updateSQL) +
                           Main.QueryDelimiter;
                if (!UpdateTable.UT(utString))
                {
                    status = false;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(this.ToString() + "-" + System.Reflection.MethodBase.GetCurrentMethod().Name + "() : Error");
                status = false;
            }
            return(status);
        }
Esempio n. 10
0
        public Boolean updateStockGroup(stockgroup3 sgroup)
        {
            Boolean status   = true;
            string  utString = "";

            try
            {
                string updateSQL = "update StockGroup set " +
                                   "GroupDescription = " + "'" + sgroup.GroupDescription + "'" +
                                   " where GroupLevel = " + sgroup.GroupLevel + " and GroupCode = '" + sgroup.GroupCode + "'";

                utString = utString + updateSQL + Main.QueryDelimiter;
                utString = utString +
                           ActivityLogDB.PrepareActivityLogQquerString("update", "StockGroup", "", updateSQL) +
                           Main.QueryDelimiter;

                if (!UpdateTable.UT(utString))
                {
                    status = false;
                }
            }
            catch (Exception ex)
            {
                status = false;
            }
            return(status);
        }
Esempio n. 11
0
        public Boolean updateMenuItem(menuitem menu)
        {
            Boolean status   = true;
            string  utString = "";

            try
            {
                string updateSQL = "update MenuItem set Description='" + menu.description + "'," +
                                   "ShortDescription='" + menu.shortDescription + "'," +
                                   "Type=" + menu.menuitemType + "," +
                                   "DocumentID='" + menu.documentID + "'," +
                                   "PageLink='" + menu.pageLink + "'," +
                                   "VersionRequired='" + menu.versionrequired + "'," +
                                   "MenuGroup='" + menu.menugrp + "'," +
                                   "Status=" + menu.menuitemStatus +
                                   " where MenuItemID='" + menu.menuItemID + "'";
                utString = utString + updateSQL + Main.QueryDelimiter;
                utString = utString +
                           ActivityLogDB.PrepareActivityLogQquerString("update", "MenuItem", "", updateSQL) +
                           Main.QueryDelimiter;
                if (!UpdateTable.UT(utString))
                {
                    status = false;
                }
            }
            catch (Exception)
            {
                status = false;
            }
            return(status);
        }
Esempio n. 12
0
        public Boolean insertStockGroup(stockgroup3 sgroup)
        {
            Boolean status   = true;
            string  utString = "";

            try
            {
                string updateSQL = "insert into StockGroup " +
                                   "(Grouplevel,GroupCode,GroupDescription,CreateTime,CreateUser) " +
                                   "values ('" + sgroup.GroupLevel + "','"
                                   + sgroup.GroupCode + "','" +
                                   sgroup.GroupDescription + "'," +
                                   "GETDATE()" + ",'" +
                                   Login.userLoggedIn + "')";

                utString = utString + updateSQL + Main.QueryDelimiter;
                utString = utString +
                           ActivityLogDB.PrepareActivityLogQquerString("insert", "StockGroup", "", updateSQL) +
                           Main.QueryDelimiter;

                if (!UpdateTable.UT(utString))
                {
                    status = false;
                }
            }
            catch (Exception ex)
            {
                status = false;
            }
            return(status);
        }
Esempio n. 13
0
        public Boolean reverseStockITem(stockitem sitem)
        {
            Boolean status   = true;
            string  utString = "";

            try
            {
                string updateSQL = "update StockItem set DocumentStatus=" + sitem.documentStatus +
                                   ", forwardUser='******'" +
                                   ", ForwarderList='" + sitem.ForwarderList + "'" +
                                   " where  StockItemID='" + sitem.StockItemID + "'";
                utString = utString + updateSQL + Main.QueryDelimiter;
                utString = utString +
                           ActivityLogDB.PrepareActivityLogQquerString("update", "StockItem", "", updateSQL) +
                           Main.QueryDelimiter;
                if (!UpdateTable.UT(utString))
                {
                    status = false;
                }
            }
            catch (Exception)
            {
                status = false;
            }
            return(status);
        }
Esempio n. 14
0
        public Boolean ApproveStockItem(stockitem prevsitem, string id)
        {
            Boolean status   = true;
            string  utString = "";

            try
            {
                string updateSQL = "update StockItem set StockItemID = '" + id +
                                   "', documentstatus=99" +
                                   ", status=1" +
                                   ", ApproveUser='******'" +
                                   " where  StockItemID='" + prevsitem.StockItemID + "'";
                utString = utString + updateSQL + Main.QueryDelimiter;
                utString = utString +
                           ActivityLogDB.PrepareActivityLogQquerString("approve", "StockItem", "", updateSQL) +
                           Main.QueryDelimiter;
                if (!UpdateTable.UT(utString))
                {
                    status = false;
                }
            }
            catch (Exception)
            {
                status = false;
            }
            return(status);
        }
Esempio n. 15
0
        public Boolean updateCustomerGroup(accountgroup agroup)
        {
            Boolean status   = true;
            string  utString = "";

            try
            {
                string updateSQL = "update AccountGroup set " +
                                   "GroupDescription = " + "'" + agroup.GroupDescription + "'" +
                                   " where GroupLevel = " + agroup.GroupLevel + " and GroupCode = '" + agroup.GroupCode + "'";

                utString = utString + updateSQL + Main.QueryDelimiter;
                utString = utString +
                           ActivityLogDB.PrepareActivityLogQquerString("update", "AccountGroup", "", updateSQL) +
                           Main.QueryDelimiter;

                if (!UpdateTable.UT(utString))
                {
                    status = false;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(this.ToString() + "-" + System.Reflection.MethodBase.GetCurrentMethod().Name + "() : Error");
                status = false;
            }
            return(status);
        }
Esempio n. 16
0
        public Boolean insertDocCommList(doccommenter doc)
        {
            Boolean status   = true;
            string  utString = "";

            try
            {
                DateTime cdt       = DateTime.Now;
                string   updateSQL = "insert into DocumentCommenter (DocumentID,EmployeeID,Status,CreateTime,CreateUser)" +
                                     "values (" +
                                     "'" + doc.DocumentID + "'," +
                                     "'" + doc.EmployeeID + "'," +
                                     doc.DocumentStatus + "," +
                                     "GETDATE()" + "," +
                                     "'" + Login.userLoggedIn + "'" + ")";
                utString = utString + updateSQL + Main.QueryDelimiter;
                utString = utString +
                           ActivityLogDB.PrepareActivityLogQquerString("insert", "DocumentCommenter", "", updateSQL) +
                           Main.QueryDelimiter;
                if (!UpdateTable.UT(utString))
                {
                    status = false;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(this.ToString() + "-" + System.Reflection.MethodBase.GetCurrentMethod().Name + "() : Error");
                status = false;
            }
            return(status);
        }
Esempio n. 17
0
        public Boolean insertEmployeePosting(employeeposting empposting)
        {
            Boolean status   = true;
            string  utString = "";

            try
            {
                string updateSQL = "insert into EmployeePosting (EmployeeID,PostingDate,OfficeID,Department,ReportingOfficerID,Remarks,Status,CreateTime,CreateUser) values (" +
                                   "'" + empposting.empID + "'," +
                                   "'" + (empposting.postingDate.ToString("yyyyMMdd")) + "'," +
                                   "'" + empposting.officeID + "'," +
                                   "'" + empposting.departmentID + "'," +
                                   "'" + empposting.ReportingOfficer + "'," +
                                   "'" + empposting.remarks + "'," +
                                   empposting.Status + "," +
                                   "GETDATE()" + "," +
                                   "'" + Login.userLoggedIn + "'" + ")";
                utString = utString + updateSQL + Main.QueryDelimiter;
                utString = utString +
                           ActivityLogDB.PrepareActivityLogQquerString("insert", "EmployeePosting", "", updateSQL) +
                           Main.QueryDelimiter;
                if (!UpdateTable.UT(utString))
                {
                    status = false;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(this.ToString() + "-" + System.Reflection.MethodBase.GetCurrentMethod().Name + "() : Error");
                status = false;
            }
            return(status);
        }
Esempio n. 18
0
        public Boolean updateDocCommList(doccommenter doc, doccommenter prevdoc)
        {
            Boolean status   = true;
            string  utString = "";

            try
            {
                string updateSQL = "update DocumentCommenter set EmployeeID='" + doc.EmployeeID + "'," +
                                   " Status=" + doc.DocumentStatus +
                                   " where DocumentID='" + prevdoc.DocumentID + "'" +
                                   " and EmployeeID='" + prevdoc.EmployeeID + "'";
                utString = utString + updateSQL + Main.QueryDelimiter;
                utString = utString +
                           ActivityLogDB.PrepareActivityLogQquerString("update", "DocumentCommenter", "", updateSQL) +
                           Main.QueryDelimiter;
                if (!UpdateTable.UT(utString))
                {
                    status = false;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(this.ToString() + "-" + System.Reflection.MethodBase.GetCurrentMethod().Name + "() : Error");
                status = false;
            }
            return(status);
        }
Esempio n. 19
0
 public Boolean forwardPR(purchasereturnheader prh)
 {
     Boolean status = true;
     string utString = "";
     try
     {
         string updateSQL = "update PurchaseReturnHeader set DocumentStatus=" + (prh.DocumentStatus + 1) +
             ", forwardUser='******'" +
             ", commentStatus='" + prh.CommentStatus + "'" +
             ", ForwarderList='" + prh.ForwarderList + "'" +
             " where DocumentID='" + prh.DocumentID + "'" +
             " and TemporaryNo=" + prh.TemporaryNo +
             " and TemporaryDate='" + prh.TemporaryDate.ToString("yyyy-MM-dd") + "'";
         utString = utString + updateSQL + Main.QueryDelimiter;
         utString = utString +
         ActivityLogDB.PrepareActivityLogQquerString("update", "PurchaseReturnHeader", "", updateSQL) +
         Main.QueryDelimiter;
         if (!UpdateTable.UT(utString))
         {
             status = false;
         }
     }
     catch (Exception)
     {
         status = false;
     }
     return status;
 }
Esempio n. 20
0
        public Boolean insertUserMenuPrivilege(usermenuprivilege mp)
        {
            Boolean status   = true;
            string  utString = "";

            try
            {
                DateTime cdt       = DateTime.Now;
                string   updateSQL = "insert into MenuPrivilege (UserID,MenuItemString,CreateTime,CreateUser)" +
                                     " values (" +
                                     "'" + mp.userID + "'," +
                                     "'" + mp.menuItemString + "'," +
                                     "GETDATE()" + "," +
                                     "'" + Login.userLoggedIn + "'" + ")";
                utString = utString + updateSQL + Main.QueryDelimiter;
                utString = utString +
                           ActivityLogDB.PrepareActivityLogQquerString("insert", "MenuPrivilege", "", updateSQL) +
                           Main.QueryDelimiter;
                if (!UpdateTable.UT(utString))
                {
                    status = false;
                }
            }
            catch (Exception ex)
            {
                status = false;
            }
            return(status);
        }
Esempio n. 21
0
        public void updateRefNoWisePRDetailInStock(double Quant, int refNo)
        {
            //Boolean status = true;
            string utString = "";
            try
            {
                string updateSQL = "update Stock set  " +
                    " PresentStock=" + "( (select PresentStock from Stock where RowID = " + refNo + ")-" + Quant + ")"+
                    ", PurchaseReturnQuantity=" + "( (select PurchaseReturnQuantity from Stock where RowID = " + refNo + ")+" + Quant + ")" +
                    " where RowID=" + refNo;
                utString = utString + updateSQL + Main.QueryDelimiter;
                utString = utString +
                ActivityLogDB.PrepareActivityLogQquerString("update", "Stock", "", updateSQL) +
                Main.QueryDelimiter;

                if (!UpdateTable.UT(utString))
                {
                    //status = false;
                    MessageBox.Show("failed to Update In Reference Number Wise PRDetail in stock");
                    return;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("failed to Update In Reference Number Wise PRDetail in stock");
                return;
            }
            //return status;
        }
Esempio n. 22
0
        public Boolean deleteUserMenuPrivilege(string userID)
        {
            Boolean status   = true;
            string  utString = "";

            try
            {
                SqlConnection conn      = new SqlConnection(Login.connString);
                string        updateSQL = "delete MenuPrivilege " +
                                          "where UserID='" + userID + "'";
                utString = utString + updateSQL + Main.QueryDelimiter;
                utString = utString +
                           ActivityLogDB.PrepareActivityLogQquerString("delete", "MenuPrivilege", "", updateSQL) +
                           Main.QueryDelimiter;
                if (!UpdateTable.UT(utString))
                {
                    status = false;
                }
            }
            catch (Exception)
            {
                status = false;
            }
            return(status);
        }
Esempio n. 23
0
        public Boolean reverseProjectHeader(projectheader prevpheader)
        {
            Boolean status   = true;
            string  utString = "";

            try
            {
                string updateSQL = "update ProjectHeader set DocumentStatus=" + prevpheader.DocumentStatus +
                                   ", forwardUser='******'" +
                                   ", ForwarderList='" + prevpheader.ForwarderList + "'" +
                                   " where DocumentID='" + prevpheader.DocumentID + "'" +
                                   " and TemporaryNo=" + prevpheader.TemporaryNo +
                                   " and TemporaryDate='" + prevpheader.TemporaryDate.ToString("yyyy-MM-dd") + "'";
                utString = utString + updateSQL + Main.QueryDelimiter;
                utString = utString +
                           ActivityLogDB.PrepareActivityLogQquerString("update", "ProjectHeader", "", updateSQL) +
                           Main.QueryDelimiter;
                if (!UpdateTable.UT(utString))
                {
                    status = false;
                }
            }
            catch (Exception)
            {
                status = false;
            }
            return(status);
        }
Esempio n. 24
0
        public Boolean ApproveIndentGeneral(indentgeneralheader igh)
        {
            Boolean status   = true;
            string  utString = "";

            try
            {
                string updateSQL = "update IndentGeneralHeader set DocumentStatus=99, status=1 " +
                                   ", ApproveUser='******'" +
                                   ", commentStatus='" + igh.CommentStatus + "'" +
                                   ", DocumentNo=" + igh.DocumentNo +
                                   ", DocumentDate=convert(date, getdate())" +
                                   " where DocumentID='" + igh.DocumentID + "'" +
                                   " and TemporaryNo=" + igh.TemporaryNo +
                                   " and TemporaryDate='" + igh.TemporaryDate.ToString("yyyy-MM-dd") + "'";
                utString = utString + updateSQL + Main.QueryDelimiter;
                utString = utString +
                           ActivityLogDB.PrepareActivityLogQquerString("update", "IndentGeneralHeader", "", updateSQL) +
                           Main.QueryDelimiter;
                if (!UpdateTable.UT(utString))
                {
                    status = false;
                }
            }
            catch (Exception)
            {
                status = false;
            }
            return(status);
        }
Esempio n. 25
0
        public Boolean updateBankBranch(bankbranch branch)
        {
            Boolean status   = true;
            string  utString = "";

            try
            {
                string updateSQL = "update BankBranch set BankID='" + branch.BankID +
                                   "', BranchName='" + branch.BranchName +
                                   "', Address1='" + branch.Address1 +
                                   "', Address2='" + branch.Address2 +
                                   "', Address3='" + branch.Address3 +
                                   "', IFSCCode='" + branch.IFSCCode +
                                   "', SWIFTCode='" + branch.SWIFTCode +
                                   "', MICRCode='" + branch.MICRCode +
                                   "', BSRCode='" + branch.BSRCode +
                                   "',Status=" + branch.status +
                                   " where rowID=" + branch.BranchID;
                utString = utString + updateSQL + Main.QueryDelimiter;
                utString = utString +
                           ActivityLogDB.PrepareActivityLogQquerString("update", "BankBranch", "", updateSQL) +
                           Main.QueryDelimiter;
                if (!UpdateTable.UT(utString))
                {
                    status = false;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(this.ToString() + "-" + System.Reflection.MethodBase.GetCurrentMethod().Name + "() : Error");
                status = false;
            }
            return(status);
        }
Esempio n. 26
0
        public Boolean reverseInvoiceInHeader(invoiceinheader inh)
        {
            Boolean status   = true;
            string  utString = "";

            try
            {
                string updateSQL = "update InvoiceInHeader set DocumentStatus=" + inh.DocumentStatus +
                                   // ",QCStatus=" + mrnh.QCStatus +
                                   ", forwardUser='******'" +
                                   ", commentStatus='" + inh.CommentStatus + "'" +
                                   ", ForwarderList='" + inh.ForwarderList + "'" +
                                   " where DocumentID='" + inh.DocumentID + "'" +
                                   " and TemporaryNo=" + inh.TemporaryNo +
                                   " and TemporaryDate='" + inh.TemporaryDate.ToString("yyyy-MM-dd") + "'";
                utString = utString + updateSQL + Main.QueryDelimiter;
                utString = utString +
                           ActivityLogDB.PrepareActivityLogQquerString("update", "InvoiceInHeader", "", updateSQL) +
                           Main.QueryDelimiter;
                if (!UpdateTable.UT(utString))
                {
                    status = false;
                }
            }
            catch (Exception)
            {
                status = false;
            }
            return(status);
        }
Esempio n. 27
0
        public Boolean insertUser(user usr)
        {
            Boolean status   = true;
            string  utString = "";

            try
            {
                DateTime cdt       = DateTime.Now;
                string   updateSQL = "insert into ERPUser (UserID,Password,EmployeeID,Type,Status,CreateTime,CreateUser)" +
                                     "values (" +
                                     "'" + usr.userID + "'," +
                                     "'" + usr.userPassword + "'," +
                                     usr.userEmpID + "," +
                                     usr.userType + "," +
                                     usr.userStatus + "," +
                                     "GETDATE()" + "," +
                                     "'" + Login.userLoggedIn + "'" + ")";
                utString = utString + updateSQL + Main.QueryDelimiter;
                utString = utString +
                           ActivityLogDB.PrepareActivityLogQquerString("insert", "ERPUser", "", updateSQL) +
                           Main.QueryDelimiter;
                if (!UpdateTable.UT(utString))
                {
                    status = false;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(this.ToString() + "-" + System.Reflection.MethodBase.GetCurrentMethod().Name + "() : Error");
                status = false;
            }
            return(status);
        }
Esempio n. 28
0
        public Boolean insertAccountGroup(accountgroup agroup)
        {
            Boolean status   = true;
            string  utString = "";

            try
            {
                string updateSQL = "insert into AccountGroup " +
                                   "(Grouplevel,GroupCode,GroupDescription,CreateTime,CreateUser) " +
                                   "values ('" + agroup.GroupLevel + "','"
                                   + agroup.GroupCode + "','" +
                                   agroup.GroupDescription + "'," +
                                   "GETDATE()" + ",'" +
                                   Login.userLoggedIn + "')";

                utString = utString + updateSQL + Main.QueryDelimiter;
                utString = utString +
                           ActivityLogDB.PrepareActivityLogQquerString("insert", "AccountGroup", "", updateSQL) +
                           Main.QueryDelimiter;

                if (!UpdateTable.UT(utString))
                {
                    status = false;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(this.ToString() + "-" + System.Reflection.MethodBase.GetCurrentMethod().Name + "() : Error");
                status = false;
            }
            return(status);
        }
Esempio n. 29
0
        public Boolean updateEmployee(employee emp)
        {
            Boolean status   = true;
            string  utString = "";

            try
            {
                string updateSQL = "update Employee set name='" + emp.empName + "',DOB='" +
                                   (emp.empDOB.ToString("yyyyMMdd HH:mm:ss")) +
                                   "',DOJ='" + (emp.empDOJ.ToString("yyyyMMdd HH:mm:ss")) +
                                   "',phoneno='" + emp.empPhoneNo + "',Status=" + emp.empStatus +
                                   ////",Photo='" + emp.empPhoto + "'" +
                                   " where EmployeeID='" + emp.empID + "'";
                utString = utString + updateSQL + Main.QueryDelimiter;
                utString = utString +
                           ActivityLogDB.PrepareActivityLogQquerString("update", "Employee", "", updateSQL) +
                           Main.QueryDelimiter;
                if (!UpdateTable.UT(utString))
                {
                    status = false;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(this.ToString() + "-" + System.Reflection.MethodBase.GetCurrentMethod().Name + "() : Error");
                status = false;
            }
            return(status);
        }
Esempio n. 30
0
        public Boolean updateDocForUnlocking(DocUnlock du, int docStat, string docID)
        {
            Boolean status   = true;
            string  utString = "";

            try
            {
                string updateSQL = "update " + du.TableName +
                                   " set Status=96,ApproveUser=NULL,DocumentStatus= " + docStat +
                                   " where TemporaryNo = " + du.TemporaryNo +
                                   " and TemporaryDate = '" + du.TemporaryDate.ToString("yyyy-MM-dd") + "' and DocumentID = '" + docID + "'";
                utString = utString + updateSQL + Main.QueryDelimiter;
                utString = utString +
                           ActivityLogDB.PrepareActivityLogQquerString("update", du.TableName, "", updateSQL) +
                           Main.QueryDelimiter;
                if (!UpdateTable.UT(utString))
                {
                    status = false;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(this.ToString() + "-" + System.Reflection.MethodBase.GetCurrentMethod().Name + "() : Error");
                status = false;
            }
            return(status);
        }