public string Get(string value, int Type, string GCode)
        {
            DataSet             ds = new DataSet();
            ManageSQLConnection manageSQLConnection = new ManageSQLConnection();

            if (Type == 1)
            {
                List <KeyValuePair <string, string> > sqlParameters = new List <KeyValuePair <string, string> >();
                sqlParameters.Add(new KeyValuePair <string, string>("@SIDate", value));
                sqlParameters.Add(new KeyValuePair <string, string>("@GCode", GCode));
                ds = manageSQLConnection.GetDataSetValues("GetStockIssueDetailsByDate", sqlParameters);
            }
            else if (Type == 2)
            {
                List <KeyValuePair <string, string> > sqlParameters = new List <KeyValuePair <string, string> >();
                sqlParameters.Add(new KeyValuePair <string, string>("@SINo", value));
                ds = manageSQLConnection.GetDataSetValues("GetStockIssueDetailsBySINo", sqlParameters);
            }
            else
            {
                List <KeyValuePair <string, string> > sqlParameters = new List <KeyValuePair <string, string> >();
                sqlParameters.Add(new KeyValuePair <string, string>("@GCode", value));
                ds = manageSQLConnection.GetDataSetValues("GetGatePass", sqlParameters);
            }
            return(JsonConvert.SerializeObject(ds));
        }
        public string Post(DeliveryOrderSchemeWiseEntity SchemeWise)
        {
            DataSet             ds = new DataSet();
            ManageSQLConnection manageSQLConnection             = new ManageSQLConnection();
            List <KeyValuePair <string, string> > sqlParameters = new List <KeyValuePair <string, string> >();

            sqlParameters.Add(new KeyValuePair <string, string>("@FromDate", SchemeWise.FromDate));
            sqlParameters.Add(new KeyValuePair <string, string>("@ToDate", SchemeWise.ToDate));
            sqlParameters.Add(new KeyValuePair <string, string>("@GodownCode", SchemeWise.GCode));
            sqlParameters.Add(new KeyValuePair <string, string>("@Schcode", SchemeWise.SchCode));
            sqlParameters.Add(new KeyValuePair <string, string>("@RCode", SchemeWise.RCode));
            ds = manageSQLConnection.GetDataSetValues("GetDeliveryOrdersOtherScheme", sqlParameters);
            ManageDOOthers manageDOSPLPDS = new ManageDOOthers();
            ManageReport   manageReport   = new ManageReport();

            if (manageReport.CheckDataAvailable(ds))
            {
                CommonEntity entity = new CommonEntity
                {
                    dataSet  = ds,
                    GCode    = SchemeWise.GCode,
                    FromDate = SchemeWise.FromDate,
                    Todate   = SchemeWise.ToDate,
                    UserName = SchemeWise.UserName,
                    GName    = SchemeWise.GName,
                    RName    = SchemeWise.RName
                };
                // manageDOAllScheme.GenerateDOAllSchemeReport(entity);
                Task.Run(() => manageDOSPLPDS.GenerateDOOthersScheme(entity)); //Generate the Report
            }
            return(JsonConvert.SerializeObject(ds.Tables[0]));
        }
        public GToGEntity Get(string IssueMemoNumber)
        {
            bool isUpdated = false;

            if (!string.IsNullOrEmpty(IssueMemoNumber))
            {
                ManageGtoG manageGtoG = new ManageGtoG();
                AuditLog.WriteError("IssueMemoNumber is : " + IssueMemoNumber);
                //Check issuememo number
                var result = manageGtoG.CheckIssueMemoNumber(IssueMemoNumber);
                if (result.Item1)
                {
                    ManageSQLConnection manageSQLConnection             = new ManageSQLConnection();
                    List <KeyValuePair <string, string> > sqlParameters = new List <KeyValuePair <string, string> >();
                    sqlParameters.Add(new KeyValuePair <string, string>("@DocNumber", IssueMemoNumber));
                    isUpdated = manageSQLConnection.UpdateValues("UpdateGToGAck", sqlParameters);
                    return(GetMessage(IssueMemoNumber, isUpdated));
                }
                else
                {
                    return(result.Item2);
                }
            }
            else
            {
                AuditLog.WriteError("IssueMemoNumber is : " + IssueMemoNumber);
            }

            return(GetNullIssuememo(IssueMemoNumber));
        }
        public string Post([FromBody] CommodityParameter commodity)
        {
            DataSet             ds = new DataSet();
            ManageSQLConnection manageSQLConnection             = new ManageSQLConnection();
            List <KeyValuePair <string, string> > sqlParameters = new List <KeyValuePair <string, string> >();

            sqlParameters.Add(new KeyValuePair <string, string>("@FDate", commodity.FDate));
            sqlParameters.Add(new KeyValuePair <string, string>("@ToDate", commodity.ToDate));
            sqlParameters.Add(new KeyValuePair <string, string>("@Godcode", commodity.GCode));
            sqlParameters.Add(new KeyValuePair <string, string>("@ITCode", commodity.TRCode));
            sqlParameters.Add(new KeyValuePair <string, string>("@RCode", commodity.RCode));
            sqlParameters.Add(new KeyValuePair <string, string>("@IssuedToGodown", Convert.ToString(commodity.IssueToGodown)));
            sqlParameters.Add(new KeyValuePair <string, string>("@IssuedToDepositor", Convert.ToString(commodity.IssueToDepositor)));
            ds = manageSQLConnection.GetDataSetValues("GetCommodityIssueMemo", sqlParameters);

            CommodityIssueMemo commodityIssueMemo = new CommodityIssueMemo();
            ManageReport       manageReport       = new ManageReport();

            //filter condotions
            if (manageReport.CheckDataAvailable(ds))
            {
                CommonEntity entity = new CommonEntity
                {
                    dataSet  = ds,
                    GCode    = commodity.GCode,
                    FromDate = commodity.FDate,
                    Todate   = commodity.ToDate,
                    UserName = commodity.UserName
                };
                // commodityIssueMemo.GenerateCommodityIssueMemoReport(entity);
                Task.Run(() => commodityIssueMemo.GenerateCommodityIssueMemoReport(entity)); //Generate the Report
            }

            return(JsonConvert.SerializeObject(ds.Tables[0]));
        }
Exemple #5
0
        public bool Post(HoqtAbstract hoqtyabstract)
        {
            List <KeyValuePair <string, string> > sqlParameters = new List <KeyValuePair <string, string> >();
            ManageSQLConnection manageSQL = new ManageSQLConnection();

            sqlParameters.Add(new KeyValuePair <string, string>("@RCode", hoqtyabstract.RCode));
            sqlParameters.Add(new KeyValuePair <string, string>("@QtyMonth", hoqtyabstract.qtyMonth));
            sqlParameters.Add(new KeyValuePair <string, string>("@QtyYear", hoqtyabstract.qtyYear));
            sqlParameters.Add(new KeyValuePair <string, string>("@ITCode", hoqtyabstract.ITCode));
            sqlParameters.Add(new KeyValuePair <string, string>("@Trcode", hoqtyabstract.Trcode));
            sqlParameters.Add(new KeyValuePair <string, string>("@OB", hoqtyabstract.OB));
            sqlParameters.Add(new KeyValuePair <string, string>("@PurchaseReceipt", hoqtyabstract.PurchaseReceipt));
            sqlParameters.Add(new KeyValuePair <string, string>("@FreeRice", hoqtyabstract.FreeRice));
            sqlParameters.Add(new KeyValuePair <string, string>("@OtherReceipt", hoqtyabstract.OtherReceipt));
            sqlParameters.Add(new KeyValuePair <string, string>("@TotalReceipt", hoqtyabstract.TotalReceipt));
            sqlParameters.Add(new KeyValuePair <string, string>("@Issueonsales", hoqtyabstract.Issueonsales));
            sqlParameters.Add(new KeyValuePair <string, string>("@Freeissue", hoqtyabstract.Freeissue));
            sqlParameters.Add(new KeyValuePair <string, string>("@Otherissue", hoqtyabstract.Otherissue));
            sqlParameters.Add(new KeyValuePair <string, string>("@TotalIssues", hoqtyabstract.TotalIssues));
            sqlParameters.Add(new KeyValuePair <string, string>("@CB", hoqtyabstract.CB));
            sqlParameters.Add(new KeyValuePair <string, string>("@CS", hoqtyabstract.CS));
            sqlParameters.Add(new KeyValuePair <string, string>("@ActualBalance", hoqtyabstract.ActualBalance));
            sqlParameters.Add(new KeyValuePair <string, string>("@HOQtyId", hoqtyabstract.HOQtyId));
            return(manageSQL.InsertData("InsertHOqtyabstract", sqlParameters));
        }
        public bool Put(NewTicketEntity entity)
        {
            ManageSQLConnection manageSQLConnection             = new ManageSQLConnection();
            List <KeyValuePair <string, string> > sqlParameters = new List <KeyValuePair <string, string> >();

            sqlParameters.Add(new KeyValuePair <string, string>("@TicketID", (entity.ticket_id).ToString()));
            sqlParameters.Add(new KeyValuePair <string, string>("@assingedTo", (entity.assingedTo).ToString()));
            sqlParameters.Add(new KeyValuePair <string, string>("@Ticketstatus", entity.Ticketstatus));
            sqlParameters.Add(new KeyValuePair <string, string>("@short_desc", entity.short_desc));
            // sqlParameters.Add(new KeyValuePair<string, string>("@URL", entity.URL));
            sqlParameters.Add(new KeyValuePair <string, string>("@StatusCode", (entity.StatusCode).ToString()));
            sqlParameters.Add(new KeyValuePair <string, string>("@CC", entity.CC));
            var result = manageSQLConnection.UpdateValues("UpdateTickets", sqlParameters);

            MailSending mailSending = new MailSending();
            //Mail sending
            MailEntity mailEntity = new MailEntity
            {
                FromMailid   = GlobalVariables.FromMailid,
                FromPassword = GlobalVariables.Password,
                ToMailid     = entity.assingedTo,
                ToCC         = entity.bodyMessage.TOCC,
                Port         = GlobalVariables.Port,
                Subject      = entity.short_desc,
                BodyMessage  = mailSending.BodyMessage(entity.bodyMessage, entity.ticket_id),
                SMTP         = GlobalVariables.Host
            };

            mailSending.Send(mailEntity);

            return(result);
        }
Exemple #7
0
        public string Get(int roleId)
        {
            ManageSQLConnection manageSQLConnection               = new ManageSQLConnection();
            List <KeyValuePair <string, string> > parameterList   = new List <KeyValuePair <string, string> >();
            KeyValuePair <string, string>         parameterValues = new KeyValuePair <string, string>();
            ManageMenu manageMenu = new ManageMenu();
            DataSet    ds         = new DataSet();

            try
            {
                parameterValues = new KeyValuePair <string, string>("@RoleId", Convert.ToString(roleId));
                parameterList.Add(parameterValues);
                ds = manageSQLConnection.GetDataSetValues("GetMenuMaster", parameterList);
                List <Menu> menus = new List <Menu>();
                menus = manageMenu.ConvertDataTableToList(ds.Tables[0]);
                var reult = manageMenu.GetMenuTree(menus, 0);
                return(JsonConvert.SerializeObject(reult));
            }
            finally
            {
                ds.Dispose();
                parameterList = null;
                manageMenu    = null;
            }
        }
Exemple #8
0
        public bool Post(ServiceProviderEntity serviceProvider)
        {
            List <KeyValuePair <string, string> > sqlParameters = new List <KeyValuePair <string, string> >();
            ManageSQLConnection manageSQL = new ManageSQLConnection();

            sqlParameters.Add(new KeyValuePair <string, string>("@ServiceID", serviceProvider.ServiceID));
            sqlParameters.Add(new KeyValuePair <string, string>("@Month", serviceProvider.Month));
            sqlParameters.Add(new KeyValuePair <string, string>("@Year", serviceProvider.Year));
            sqlParameters.Add(new KeyValuePair <string, string>("@CompanyName", serviceProvider.CompanyName));
            sqlParameters.Add(new KeyValuePair <string, string>("@TIN", serviceProvider.TIN));
            sqlParameters.Add(new KeyValuePair <string, string>("@AccYear", serviceProvider.AccYear));
            sqlParameters.Add(new KeyValuePair <string, string>("@BillNo", serviceProvider.BillNo));
            sqlParameters.Add(new KeyValuePair <string, string>("@BillDate", serviceProvider.BillDate));
            sqlParameters.Add(new KeyValuePair <string, string>("@CommodityName", serviceProvider.CommodityName));
            sqlParameters.Add(new KeyValuePair <string, string>("@TaxType", serviceProvider.TaxType));
            sqlParameters.Add(new KeyValuePair <string, string>("@SGST", serviceProvider.SGST));
            sqlParameters.Add(new KeyValuePair <string, string>("@CGST", serviceProvider.CGST));
            sqlParameters.Add(new KeyValuePair <string, string>("@IGST", serviceProvider.IGST));
            sqlParameters.Add(new KeyValuePair <string, string>("@Amount", serviceProvider.Amount));
            sqlParameters.Add(new KeyValuePair <string, string>("@TaxPercentage", serviceProvider.TaxPercentage));
            sqlParameters.Add(new KeyValuePair <string, string>("@TaxAmount", serviceProvider.TaxAmount));
            sqlParameters.Add(new KeyValuePair <string, string>("@Total", serviceProvider.Total));
            sqlParameters.Add(new KeyValuePair <string, string>("@CreatedBy", serviceProvider.CreatedBy));
            sqlParameters.Add(new KeyValuePair <string, string>("@CreatedDate", serviceProvider.CreatedDate.ToString("MM/dd/yyyy")));
            sqlParameters.Add(new KeyValuePair <string, string>("@GCode", serviceProvider.GCode));
            sqlParameters.Add(new KeyValuePair <string, string>("@RCode", serviceProvider.RCode));
            return(manageSQL.InsertData("InsertServiceProviderEntry", sqlParameters));
        }
Exemple #9
0
        public string Post([FromBody] PurchaseParameter reportParameter)
        {
            DataSet             ds = new DataSet();
            ManageSQLConnection manageSQLConnection             = new ManageSQLConnection();
            List <KeyValuePair <string, string> > sqlParameters = new List <KeyValuePair <string, string> >();

            sqlParameters.Add(new KeyValuePair <string, string>("@FDATE", reportParameter.FromDate));
            sqlParameters.Add(new KeyValuePair <string, string>("@ToDate", reportParameter.ToDate));
            sqlParameters.Add(new KeyValuePair <string, string>("@Godcode", reportParameter.GCode));
            sqlParameters.Add(new KeyValuePair <string, string>("@orderno", reportParameter.OrderNo));
            sqlParameters.Add(new KeyValuePair <string, string>("@RCode", reportParameter.RCode));
            ds = manageSQLConnection.GetDataSetValues("Getrono", sqlParameters);
            RoNoController RoNoPurchase = new RoNoController();
            ManageReport   manageReport = new ManageReport();

            if (manageReport.CheckDataAvailable(ds))
            {
                CommonEntity entity = new CommonEntity
                {
                    dataSet  = ds,
                    GCode    = reportParameter.GCode,
                    FromDate = reportParameter.FromDate,
                    Todate   = reportParameter.ToDate,
                    UserName = reportParameter.UserName
                };
                Task.Run(() => RoNoPurchase.GenerateRoNoPurchase(entity));
            }
            return(JsonConvert.SerializeObject(ds.Tables[0]));
        }
        public string Post(StockPayement stockPayement)
        {
            DataSet             ds = new DataSet();
            ManageSQLConnection manageSQLConnection = new ManageSQLConnection();

            if (stockPayement.Type == 1)
            {
                List <KeyValuePair <string, string> > sqlParameters = new List <KeyValuePair <string, string> >();
                sqlParameters.Add(new KeyValuePair <string, string>("@DoDate", stockPayement.DoDate));
                sqlParameters.Add(new KeyValuePair <string, string>("@ReceivorCode", stockPayement.ReceivorCode));
                sqlParameters.Add(new KeyValuePair <string, string>("@GCode", stockPayement.GCode));
                ds = manageSQLConnection.GetDataSetValues("GetPaymentDetailsForShop", sqlParameters);
                return(JsonConvert.SerializeObject(ds.Tables[0]));
            }
            else
            {
                List <KeyValuePair <string, string> > sqlParameters = new List <KeyValuePair <string, string> >();
                sqlParameters.Add(new KeyValuePair <string, string>("@DoDate", stockPayement.DoDate));
                sqlParameters.Add(new KeyValuePair <string, string>("@ReceivorCode", stockPayement.ReceivorCode));
                sqlParameters.Add(new KeyValuePair <string, string>("@GCode", stockPayement.GCode));
                sqlParameters.Add(new KeyValuePair <string, string>("@DoNo", stockPayement.DoNo));
                ds = manageSQLConnection.GetDataSetValues("GetPreviousBalance", sqlParameters);
                return(JsonConvert.SerializeObject(ds.Tables[0]));
            }
        }
        public string Get(string FDate, string TDate, string RCode, string DCode, int type)
        {
            ManageSQLConnection sqlConnection = new ManageSQLConnection();
            DataSet             ds            = new DataSet();

            try
            {
                if (type == 1)
                {
                    ds = sqlConnection.GetDataSetValues("GetAllIncidentDetails");
                }
                else
                {
                    List <KeyValuePair <string, string> > sqlParameters = new List <KeyValuePair <string, string> >();
                    sqlParameters.Add(new KeyValuePair <string, string>("@FDate", FDate));
                    sqlParameters.Add(new KeyValuePair <string, string>("@TDate", TDate));
                    sqlParameters.Add(new KeyValuePair <string, string>("@RCode", RCode));
                    sqlParameters.Add(new KeyValuePair <string, string>("@DCode", DCode));
                    ds = sqlConnection.GetDataSetValues("GetIncidentDetails", sqlParameters);
                }
                return(JsonConvert.SerializeObject(ds.Tables[0]));
            }
            finally
            {
                ds.Dispose();
            }
        }
        public string Get(string sValue, int Type = 1)
        {
            DataSet ds = new DataSet();

            try
            {
                if (Type == 1)
                {
                    ManageSQLConnection manageSQL = new ManageSQLConnection();
                    List <KeyValuePair <string, string> > sqlParameters = new List <KeyValuePair <string, string> >();
                    sqlParameters.Add(new KeyValuePair <string, string>("@TNCSCKey", sValue));
                    sqlParameters.Add(new KeyValuePair <string, string>("@Type", "1"));
                    ds = manageSQL.GetDataSetValues("GetTNCSCSettings", sqlParameters);
                    return(JsonConvert.SerializeObject(ds.Tables[0]));
                }
                else
                {
                    ManageSQLConnection manageSQL = new ManageSQLConnection();
                    List <KeyValuePair <string, string> > sqlParameters = new List <KeyValuePair <string, string> >();
                    sqlParameters.Add(new KeyValuePair <string, string>("@TNCSCKey", sValue));
                    sqlParameters.Add(new KeyValuePair <string, string>("@Type", Type.ToString()));
                    ds = manageSQL.GetDataSetValues("GetTNCSCSettings", sqlParameters);
                    return(JsonConvert.SerializeObject(ds));
                }
            }
            finally
            {
                ds.Dispose();
            }
        }
Exemple #13
0
        public string Get(string RCode = "0", int Type = 2)
        {
            ManageSQLConnection manageSQLConnection = new ManageSQLConnection();
            DataSet             ds = new DataSet();

            try
            {
                if (Type == 2)
                {
                    List <KeyValuePair <string, string> > sqlParameters = new List <KeyValuePair <string, string> >();
                    sqlParameters.Add(new KeyValuePair <string, string>("@Type", Type.ToString()));
                    ds = manageSQLConnection.GetDataSetValues("GetPartyNameDetails", sqlParameters);
                }
                else
                {
                    List <KeyValuePair <string, string> > sqlParameters = new List <KeyValuePair <string, string> >();
                    sqlParameters.Add(new KeyValuePair <string, string>("@RCode", RCode));
                    sqlParameters.Add(new KeyValuePair <string, string>("@Type", Type.ToString()));
                    ds = manageSQLConnection.GetDataSetValues("GetPartyNameDetails", sqlParameters);
                }
                return(JsonConvert.SerializeObject(ds.Tables[0]));
            }
            finally
            {
                ds.Dispose();
            }
        }
        public string Post([FromBody] CommodityParameter commodity)
        {
            DataSet             ds = new DataSet();
            ManageSQLConnection manageSQLConnection             = new ManageSQLConnection();
            List <KeyValuePair <string, string> > sqlParameters = new List <KeyValuePair <string, string> >();

            sqlParameters.Add(new KeyValuePair <string, string>("@FDATE", commodity.FDate));
            sqlParameters.Add(new KeyValuePair <string, string>("@ToDate", commodity.ToDate));
            sqlParameters.Add(new KeyValuePair <string, string>("@Godcode", commodity.GCode));
            sqlParameters.Add(new KeyValuePair <string, string>("@RCode", commodity.RCode));
            sqlParameters.Add(new KeyValuePair <string, string>("@ScCode", commodity.TRCode));
            ds = manageSQLConnection.GetDataSetValues("GetSchemeIssueMemo", sqlParameters);
            SchemeIssueMemo schemeIssue  = new SchemeIssueMemo();
            ManageReport    manageReport = new ManageReport();

            if (manageReport.CheckDataAvailable(ds))
            {
                CommonEntity entity = new CommonEntity
                {
                    dataSet  = ds,
                    GCode    = commodity.GCode,
                    FromDate = commodity.FDate,
                    Todate   = commodity.ToDate,
                    UserName = commodity.UserName
                };
                Task.Run(() => schemeIssue.GenerateSchemeIssueMemoReport(entity)); //Generate the Report
            }
            return(JsonConvert.SerializeObject(ds.Tables[0]));
        }
        public string Post(DeliveryOrderSchemeWiseEntity marginAmount)
        {
            DataSet             ds = new DataSet();
            ManageSQLConnection manageSQLConnection             = new ManageSQLConnection();
            List <KeyValuePair <string, string> > sqlParameters = new List <KeyValuePair <string, string> >();

            sqlParameters.Add(new KeyValuePair <string, string>("@FromDate", marginAmount.FromDate));
            sqlParameters.Add(new KeyValuePair <string, string>("@ToDate", marginAmount.ToDate));
            sqlParameters.Add(new KeyValuePair <string, string>("@GodownCode", marginAmount.GCode));
            sqlParameters.Add(new KeyValuePair <string, string>("@RCode", marginAmount.RCode));
            ds = manageSQLConnection.GetDataSetValues("GetDeliveryOrderMarginAmount", sqlParameters);
            ManageDOMargin manageDOMargin = new ManageDOMargin();
            ManageReport   manageReport   = new ManageReport();

            if (manageReport.CheckDataAvailable(ds))
            {
                CommonEntity entity = new CommonEntity
                {
                    dataSet  = ds,
                    GCode    = marginAmount.GCode,
                    FromDate = marginAmount.FromDate,
                    Todate   = marginAmount.ToDate,
                    UserName = marginAmount.UserName,
                    GName    = marginAmount.GName,
                    RName    = marginAmount.RName
                };
                // commodityIssueMemo.GenerateCommodityIssueMemoReport(entity);
                Task.Run(() => manageDOMargin.GenerateDOMarginReport(entity)); //Generate the Report
            }
            return(JsonConvert.SerializeObject(ds.Tables[0]));
        }
        public string Get(string TicketID, int UserId)
        {
            // SQLConnection sqlConnection = new SQLConnection();
            ManageSQLConnection sqlConnection = new ManageSQLConnection();
            DataSet             ds            = new DataSet();

            try
            {
                List <KeyValuePair <string, string> > sqlParameters = new List <KeyValuePair <string, string> >();
                if (TicketID == "A")
                {
                    sqlParameters.Add(new KeyValuePair <string, string>("@UserId", UserId.ToString()));
                    ds = sqlConnection.GetDataSetValues("GetMyTicket", sqlParameters);
                }
                else if (TicketID == "TD")
                {
                    sqlParameters.Add(new KeyValuePair <string, string>("@UserId", UserId.ToString()));
                    ds = sqlConnection.GetDataSetValues("GetTicketDescription", sqlParameters);
                }
                else
                {
                    sqlParameters.Add(new KeyValuePair <string, string>("@TicketID", TicketID));
                    ds = sqlConnection.GetDataSetValues("ticketbyid", sqlParameters);
                }
                return(JsonConvert.SerializeObject(ds.Tables[0]));
            }
            finally
            {
                ds.Dispose();
            }
        }
        public string Get(string Month, string Year, string GCode, string Type)
        {
            ManageSQLConnection manageSQLConnection = new ManageSQLConnection();
            DataSet             ds = new DataSet();
            List <KeyValuePair <string, string> > sqlParameters = new List <KeyValuePair <string, string> >();

            try
            {
                if (Type == "1")
                {
                    sqlParameters.Add(new KeyValuePair <string, string>("@GCode", GCode));
                    sqlParameters.Add(new KeyValuePair <string, string>("@Month", Month));
                    sqlParameters.Add(new KeyValuePair <string, string>("@Year", Year));
                    ds = manageSQLConnection.GetDataSetValues("GetAllotmetforSociety", sqlParameters);
                }
                else
                {
                    sqlParameters.Add(new KeyValuePair <string, string>("@GCode", GCode));
                    sqlParameters.Add(new KeyValuePair <string, string>("@IRelates", Month));
                    ds = manageSQLConnection.GetDataSetValues("GetAllotmentShopDetails", sqlParameters);
                }
                return(JsonConvert.SerializeObject(ds));
            }
            finally
            {
                ds.Dispose();
            }
        }
        public bool InsertOpeningBalanceMaster(OpeningBalanceEntity openingBalanceList)
        {
            ManageSQLConnection manageSQLConnection = new ManageSQLConnection();
            var result = manageSQLConnection.InsertOpeningBalanceMaster(openingBalanceList);

            return(result);
        }
        public string Get(string FDate, string TDate, string RCode, string DCode,
                          string Product, string Component, string Shops, int type)
        {
            // SQLConnection sqlConnection = new SQLConnection();
            ManageSQLConnection sqlConnection = new ManageSQLConnection();
            DataSet             ds            = new DataSet();
            string procedureName = string.Empty;

            try
            {
                List <KeyValuePair <string, string> > sqlParameters = new List <KeyValuePair <string, string> >();
                sqlParameters.Add(new KeyValuePair <string, string>("@fromdate", FDate));
                sqlParameters.Add(new KeyValuePair <string, string>("@todate", TDate));
                if (type == 1)
                {
                    procedureName = "GetTicketsByDate";
                }
                else
                {
                    sqlParameters.Add(new KeyValuePair <string, string>("@RCode", RCode));
                    sqlParameters.Add(new KeyValuePair <string, string>("@DCode", DCode));
                    sqlParameters.Add(new KeyValuePair <string, string>("@Product", Product));
                    sqlParameters.Add(new KeyValuePair <string, string>("@Component", Component));
                    sqlParameters.Add(new KeyValuePair <string, string>("@Shops", Shops));
                    procedureName = "GetTickets";
                }
                ds = sqlConnection.GetDataSetValues(procedureName, sqlParameters);
                return(JsonConvert.SerializeObject(ds.Tables[0]));
            }
            finally
            {
                ds.Dispose();
            }
        }
Exemple #20
0
        public bool Post(PurchaseTaxEntity purchaseTax)
        {
            List <KeyValuePair <string, string> > sqlParameters = new List <KeyValuePair <string, string> >();
            ManageSQLConnection manageSQL = new ManageSQLConnection();

            sqlParameters.Add(new KeyValuePair <string, string>("@PurchaseID", purchaseTax.PurchaseID));
            sqlParameters.Add(new KeyValuePair <string, string>("@Month", purchaseTax.Month));
            sqlParameters.Add(new KeyValuePair <string, string>("@Year", purchaseTax.Year));
            sqlParameters.Add(new KeyValuePair <string, string>("@CompanyName", purchaseTax.CompanyName));
            sqlParameters.Add(new KeyValuePair <string, string>("@AccYear", purchaseTax.AccYear));
            sqlParameters.Add(new KeyValuePair <string, string>("@BillNo", purchaseTax.BillNo));
            sqlParameters.Add(new KeyValuePair <string, string>("@BillDate", purchaseTax.BillDate));
            sqlParameters.Add(new KeyValuePair <string, string>("@CommodityName", purchaseTax.CommodityName));
            sqlParameters.Add(new KeyValuePair <string, string>("@Quantity", purchaseTax.Quantity));
            sqlParameters.Add(new KeyValuePair <string, string>("@Rate", purchaseTax.Rate));
            sqlParameters.Add(new KeyValuePair <string, string>("@TaxType", purchaseTax.TaxType));
            sqlParameters.Add(new KeyValuePair <string, string>("@GSTType", purchaseTax.GSTType));
            sqlParameters.Add(new KeyValuePair <string, string>("@Scheme", purchaseTax.Scheme));
            sqlParameters.Add(new KeyValuePair <string, string>("@AADS", purchaseTax.AADS));
            sqlParameters.Add(new KeyValuePair <string, string>("@Measurement", purchaseTax.Measurement));
            sqlParameters.Add(new KeyValuePair <string, string>("@Hsncode", purchaseTax.Hsncode));
            sqlParameters.Add(new KeyValuePair <string, string>("@Amount", purchaseTax.Amount));
            sqlParameters.Add(new KeyValuePair <string, string>("@Percentage", purchaseTax.Percentage));
            sqlParameters.Add(new KeyValuePair <string, string>("@CGST", purchaseTax.CGST));
            sqlParameters.Add(new KeyValuePair <string, string>("@SGST", purchaseTax.SGST));
            sqlParameters.Add(new KeyValuePair <string, string>("@IGST", purchaseTax.IGST));
            sqlParameters.Add(new KeyValuePair <string, string>("@VatAmount", purchaseTax.VatAmount));
            sqlParameters.Add(new KeyValuePair <string, string>("@Total", purchaseTax.Total));
            sqlParameters.Add(new KeyValuePair <string, string>("@CreatedBy", purchaseTax.CreatedBy));
            sqlParameters.Add(new KeyValuePair <string, string>("@CreatedDate", purchaseTax.CreatedDate.ToString("MM/dd/yyyy")));
            sqlParameters.Add(new KeyValuePair <string, string>("@GCode", purchaseTax.GCode));
            sqlParameters.Add(new KeyValuePair <string, string>("@RCode", purchaseTax.RCode));
            return(manageSQL.InsertData("InsertPurchaseTaxEntry", sqlParameters));
        }
        public string Get(string FDate, string ToDate, string GCode, string Username, string RCode)
        {
            DataSet             ds = new DataSet();
            ManageSQLConnection manageSQLConnection             = new ManageSQLConnection();
            List <KeyValuePair <string, string> > sqlParameters = new List <KeyValuePair <string, string> >();

            sqlParameters.Add(new KeyValuePair <string, string>("@FDate", FDate));
            sqlParameters.Add(new KeyValuePair <string, string>("@ToDate", ToDate));
            sqlParameters.Add(new KeyValuePair <string, string>("@GCode", GCode));
            sqlParameters.Add(new KeyValuePair <string, string>("@RCode", RCode));
            ds = manageSQLConnection.GetDataSetValues("GetTransitdetails", sqlParameters);
            ManageTruckTransit manageTruckToRegion = new ManageTruckTransit();
            ManageReport       manageReport        = new ManageReport();

            if (manageReport.CheckDataAvailable(ds))
            {
                CommonEntity entity = new CommonEntity
                {
                    dataSet  = ds,
                    GCode    = GCode,
                    FromDate = FDate,
                    Todate   = ToDate,
                    UserName = Username,
                    GName    = ds.Tables[0].Rows[0]["TNCSName"].ToString(),
                    RName    = ds.Tables[0].Rows[0]["Region"].ToString()
                };
                Task.Run(() => manageTruckToRegion.GenerateTruckTransit(entity)); //Generate the Report
            }
            return(JsonConvert.SerializeObject(ds.Tables[0]));
        }
Exemple #22
0
        public string Post([FromBody] CommodityParameter commodity)
        {
            DataSet             ds = new DataSet();
            ManageSQLConnection manageSQLConnection             = new ManageSQLConnection();
            List <KeyValuePair <string, string> > sqlParameters = new List <KeyValuePair <string, string> >();

            sqlParameters.Add(new KeyValuePair <string, string>("@FDate", commodity.FDate));
            sqlParameters.Add(new KeyValuePair <string, string>("@ToDate", commodity.ToDate));
            sqlParameters.Add(new KeyValuePair <string, string>("@GodCode", commodity.GCode));
            sqlParameters.Add(new KeyValuePair <string, string>("@RCode", commodity.RCode));
            sqlParameters.Add(new KeyValuePair <string, string>("@TRCODE", commodity.TRCode));
            ds = manageSQLConnection.GetDataSetValues("GetTransactionReceipt", sqlParameters);
            TransactionReceipt stockDeliveryOrder = new TransactionReceipt();
            ManageReport       manageReport       = new ManageReport();

            if (manageReport.CheckDataAvailable(ds))
            {
                CommonEntity entity = new CommonEntity
                {
                    dataSet  = ds,
                    GCode    = commodity.GCode,
                    FromDate = commodity.FDate,
                    Todate   = commodity.ToDate,
                    UserName = commodity.UserName
                };
                Task.Run(() => stockDeliveryOrder.GenerateTransactionReceipt(entity)); //Generate the Report
            }
            return(JsonConvert.SerializeObject(ds.Tables[0]));
        }
        public string Post([FromBody] ReportParameter reportParameter)
        {
            DataSet             ds = new DataSet();
            ManageSQLConnection manageSQLConnection             = new ManageSQLConnection();
            List <KeyValuePair <string, string> > sqlParameters = new List <KeyValuePair <string, string> >();

            sqlParameters.Add(new KeyValuePair <string, string>("@FromDate", reportParameter.FromDate));
            sqlParameters.Add(new KeyValuePair <string, string>("@ToDate", reportParameter.ToDate));
            sqlParameters.Add(new KeyValuePair <string, string>("@GodownCode", reportParameter.GCode));
            sqlParameters.Add(new KeyValuePair <string, string>("@RCode", reportParameter.RCode));
            ds = manageSQLConnection.GetDataSetValues("StockReceiptForRegister", sqlParameters);
            StockReceiptRegister stockDeliveryOrder = new StockReceiptRegister();
            ManageReport         manageReport       = new ManageReport();

            if (manageReport.CheckDataAvailable(ds))
            {
                CommonEntity entity = new CommonEntity
                {
                    dataSet  = ds,
                    GCode    = reportParameter.GCode,
                    FromDate = reportParameter.FromDate,
                    Todate   = reportParameter.ToDate,
                    UserName = reportParameter.UserName
                };
                Task.Run(() => stockDeliveryOrder.GenerateStockReceiptRegister(entity)); //Generate the Report
            }
            return(JsonConvert.SerializeObject(ds.Tables[0]));
        }
        public Tuple <bool, string> Post([FromBody] List <TransferOBToHOQtyEntity> entity)
        {
            ManageSQLConnection manageSQLConnection = new ManageSQLConnection();

            try
            {
                foreach (var item in entity)
                {
                    List <KeyValuePair <string, string> > sqlParameters = new List <KeyValuePair <string, string> >();
                    sqlParameters.Add(new KeyValuePair <string, string>("@RCode", item.RegionCode));
                    sqlParameters.Add(new KeyValuePair <string, string>("@QtyMonth", item.QTYMONTH));
                    sqlParameters.Add(new KeyValuePair <string, string>("@QtyYear", item.QTYYEAR));
                    sqlParameters.Add(new KeyValuePair <string, string>("@ITCode", item.CommodityCode));
                    sqlParameters.Add(new KeyValuePair <string, string>("@Location", item.Location));
                    sqlParameters.Add(new KeyValuePair <string, string>("@OB", item.OB));
                    sqlParameters.Add(new KeyValuePair <string, string>("@PB", item.PB));
                    sqlParameters.Add(new KeyValuePair <string, string>("@CS", item.CS));
                    manageSQLConnection.InsertData("InsertOBIntoHOQtyAbstract", sqlParameters);
                }
                return(new Tuple <bool, string> (true, GlobalVariable.SavedMessage));
            }
            catch (Exception ex)
            {
                AuditLog.WriteError("Allotment" + ex.Message + " : " + ex.StackTrace);
                return(new Tuple <bool, string>(false, GlobalVariable.ErrorMessage));
            }
        }
Exemple #25
0
        public string Post([FromBody] GUGRParameter reportParameter)
        {
            DataSet             ds = new DataSet();
            ManageSQLConnection manageSQLConnection             = new ManageSQLConnection();
            List <KeyValuePair <string, string> > sqlParameters = new List <KeyValuePair <string, string> >();

            sqlParameters.Add(new KeyValuePair <string, string>("@FromDate", reportParameter.FromDate));
            sqlParameters.Add(new KeyValuePair <string, string>("@ToDate", reportParameter.ToDate));
            sqlParameters.Add(new KeyValuePair <string, string>("@GodownCode", reportParameter.GCode));
            sqlParameters.Add(new KeyValuePair <string, string>("@RCode", reportParameter.RCode));
            sqlParameters.Add(new KeyValuePair <string, string>("@Type", reportParameter.Type));
            ds = manageSQLConnection.GetDataSetValues("GETGRGU", sqlParameters);
            ManageGUGR   manageGUGR   = new ManageGUGR();
            ManageReport manageReport = new ManageReport();

            //filter condotions
            if (manageReport.CheckDataAvailable(ds))
            {
                CommonEntity entity = new CommonEntity
                {
                    dataSet  = ds,
                    GCode    = reportParameter.GCode,
                    FromDate = reportParameter.FromDate,
                    Todate   = reportParameter.ToDate,
                    UserName = reportParameter.UserName
                };
                // commodityIssueMemo.GenerateCommodityIssueMemoReport(entity);
                Task.Run(() => manageGUGR.GenerateGUGRReport(entity, reportParameter)); //Generate the Report
            }
            return(JsonConvert.SerializeObject(ds.Tables[0]));
        }
        public string Post([FromBody] ReportParameter reportParameter)
        {
            DataSet             ds = new DataSet();
            ManageSQLConnection manageSQLConnection             = new ManageSQLConnection();
            List <KeyValuePair <string, string> > sqlParameters = new List <KeyValuePair <string, string> >();

            sqlParameters.Add(new KeyValuePair <string, string>("@FromDate", reportParameter.FromDate));
            sqlParameters.Add(new KeyValuePair <string, string>("@ToDate", reportParameter.ToDate));
            sqlParameters.Add(new KeyValuePair <string, string>("@GCode", reportParameter.GCode));
            sqlParameters.Add(new KeyValuePair <string, string>("@RCode", reportParameter.RCode));
            if (reportParameter.Type == 1)
            {
                ds = manageSQLConnection.GetDataSetValues("LoadMenwagesLoading", sqlParameters);
            }
            else
            {
                ds = manageSQLConnection.GetDataSetValues("LoadMenwagesUnLoading", sqlParameters);
            }
            //StockReceiptRegister stockDeliveryOrder = new StockReceiptRegister();
            //ManageReport manageReport = new ManageReport();
            //if (manageReport.CheckDataAvailable(ds))
            //{
            //    CommonEntity entity = new CommonEntity
            //    {
            //        dataSet = ds,
            //        GCode = reportParameter.GCode,
            //        FromDate = reportParameter.FromDate,
            //        Todate = reportParameter.ToDate,
            //        UserName = reportParameter.UserName
            //    };
            //    Task.Run(() => stockDeliveryOrder.GenerateStockReceiptRegister(entity)); //Generate the Report
            //}
            return(JsonConvert.SerializeObject(ds.Tables[0]));
        }
Exemple #27
0
        public GToGEntity Post(GToGParameter gtog)
        {
            bool   isUpdated = false;
            string details   = JsonConvert.SerializeObject(gtog);

            AuditLog.WriteError(details);
            if (!string.IsNullOrEmpty(gtog.IssueMemoNumber))
            {
                ManageGtoG manageGtoG = new ManageGtoG();
                //Check issuememo number
                var result = manageGtoG.CheckIssueMemoNumber(gtog.IssueMemoNumber);
                if (result.Item1)
                {
                    ManageSQLConnection manageSQLConnection             = new ManageSQLConnection();
                    List <KeyValuePair <string, string> > sqlParameters = new List <KeyValuePair <string, string> >();
                    sqlParameters.Add(new KeyValuePair <string, string>("@DocNumber", gtog.IssueMemoNumber));
                    isUpdated = manageSQLConnection.UpdateValues("UpdateGToGAck", sqlParameters);
                    return(GetMessage(gtog.IssueMemoNumber, isUpdated));
                }
                else
                {
                    return(result.Item2);
                }
            }
            return(GetNullIssuememo(gtog.IssueMemoNumber));
        }
        public string Post([FromBody] CommodityParameter commodity)
        {
            DataSet             ds = new DataSet();
            ManageSQLConnection manageSQLConnection             = new ManageSQLConnection();
            List <KeyValuePair <string, string> > sqlParameters = new List <KeyValuePair <string, string> >();

            sqlParameters.Add(new KeyValuePair <string, string>("@FDate", commodity.FDate));
            sqlParameters.Add(new KeyValuePair <string, string>("@ToDate", commodity.ToDate));
            sqlParameters.Add(new KeyValuePair <string, string>("@Godcode", commodity.GCode));
            sqlParameters.Add(new KeyValuePair <string, string>("@RCode", commodity.RCode));
            sqlParameters.Add(new KeyValuePair <string, string>("@TRCODE", commodity.TRCode));
            sqlParameters.Add(new KeyValuePair <string, string>("@ITCode", commodity.ITCode));
            ds = manageSQLConnection.GetDataSetValues("GetCOMMODITYRECEIPT", sqlParameters);
            //
            CommodityReceipt commodityReceipt = new CommodityReceipt();
            ManageReport     manageReport     = new ManageReport();

            if (manageReport.CheckDataAvailable(ds))
            {
                CommonEntity entity = new CommonEntity
                {
                    dataSet  = ds,
                    GCode    = commodity.GCode,
                    FromDate = commodity.FDate,
                    Todate   = commodity.ToDate,
                    UserName = commodity.UserName,
                    //  SchemeName = commodity.SchemeName,
                };
                Task.Run(() => commodityReceipt.GenerateCommodityReceiptReport(entity, commodity.ITName, commodity.TRName)); //Generate the Report
            }

            return(JsonConvert.SerializeObject(ds.Tables[0]));
        }
        public string Get(string FDate, string ToDate, string GCode, string UserName, string RCode)
        {
            DataSet             ds = new DataSet();
            ManageSQLConnection manageSQLConnection             = new ManageSQLConnection();
            List <KeyValuePair <string, string> > sqlParameters = new List <KeyValuePair <string, string> >();

            sqlParameters.Add(new KeyValuePair <string, string>("@FDate", FDate));
            sqlParameters.Add(new KeyValuePair <string, string>("@ToDate", ToDate));
            sqlParameters.Add(new KeyValuePair <string, string>("@Godcode", GCode));
            sqlParameters.Add(new KeyValuePair <string, string>("@RCode", RCode));
            ds = manageSQLConnection.GetDataSetValues("GetHullingDetails", sqlParameters);
            HullingDetails hullingDetails = new HullingDetails();
            ManageReport   manageReport   = new ManageReport();

            if (manageReport.CheckDataAvailable(ds))
            {
                CommonEntity entity = new CommonEntity
                {
                    dataSet  = ds,
                    GCode    = GCode,
                    FromDate = FDate,
                    Todate   = ToDate,
                    UserName = UserName
                };
                Task.Run(() => hullingDetails.GenerateHullingReport(entity));
            }
            return(JsonConvert.SerializeObject(ds.Tables[0]));
        }
Exemple #30
0
        public string Get(string Type, string TIN = null, string PartyName = null)
        {
            ManageSQLConnection manageSQLConnection = new ManageSQLConnection();
            DataSet             ds = new DataSet();

            try
            {
                if (Type == "Registered")
                {
                    List <KeyValuePair <string, string> > sqlParameters = new List <KeyValuePair <string, string> >();
                    sqlParameters.Add(new KeyValuePair <string, string>("@Type", Type.ToString()));
                    sqlParameters.Add(new KeyValuePair <string, string>("@TIN", TIN));
                    ds = manageSQLConnection.GetDataSetValues("GetPartyLedgerdetails", sqlParameters);
                }
                else
                {
                    List <KeyValuePair <string, string> > sqlParameters = new List <KeyValuePair <string, string> >();
                    sqlParameters.Add(new KeyValuePair <string, string>("@Type", Type.ToString()));
                    sqlParameters.Add(new KeyValuePair <string, string>("@PartyName", PartyName.ToString()));
                    ds = manageSQLConnection.GetDataSetValues("GetPartyLedgerdetails", sqlParameters);
                }
                return(JsonConvert.SerializeObject(ds.Tables[0]));
            }
            finally
            {
                ds.Dispose();
            }
        }