Exemplo n.º 1
0
        public DataSet ShowBillDetail(string BID, string strStartDate, string strToDate, string challanNumber)
        {
            DataSet ds = new DataSet();

            try
            {
                SqlCommand cmd = new SqlCommand();
                cmd.CommandText = "Sp_BillDetails";
                cmd.CommandType = CommandType.StoredProcedure;
                cmd.Parameters.AddWithValue("@BranchId", BID);
                cmd.Parameters.AddWithValue("@FDate", strStartDate);
                cmd.Parameters.AddWithValue("@UDate", strToDate);
                if (string.IsNullOrEmpty(challanNumber))
                {
                    cmd.Parameters.AddWithValue("@Flag", 1);
                }
                else
                {
                    cmd.Parameters.AddWithValue("@Flag", 3);
                    cmd.Parameters.AddWithValue("@ChallanNumber", challanNumber);
                }
                ds = PrjClass.GetData(cmd);
            }
            catch (Exception) { }
            return(ds);
        }
Exemplo n.º 2
0
        public bool CheckDeliverSMSStatus(string BID, string BookingNo)
        {
            SqlCommand cmd    = new SqlCommand();
            string     res    = string.Empty;
            DataSet    ds     = new DataSet();
            string     status = string.Empty;

            cmd.CommandText = "Sp_Sel_DeliveryScreenSmsStatus";
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@BookingNumber", BookingNo);
            cmd.Parameters.AddWithValue("@BranchId", BID);
            ds = PrjClass.GetData(cmd);
            if (ds.Tables[0].Rows.Count <= 1)
            {
                res = ds.Tables[0].Rows[0]["Status"].ToString();
                if (res == "TRUE")
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            else
            {
                return(false);
            }
        }
Exemplo n.º 3
0
        public void save()
        {
            SqlCommand cmd      = new SqlCommand();
            DataSet    dsReport = new ChallanDataSet();
            DataSet    ds       = new DataSet();

            cmd             = new SqlCommand();
            cmd.CommandText = "sp_ChallanInwardSummary";
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("BranchId", Globals.BranchID);
            dsReport          = PrjClass.GetData(cmd);
            ds                = PrjClass.GetData(cmd);
            grdTmp.DataSource = ds;
            grdTmp.DataBind();
            if (dsReport.Tables[0].Rows.Count > 0)
            {
                ReportViewer1.Visible = true;
            }
            ReportViewer1.LocalReport.ReportPath = "RDLC/ChallanInward.rdlc";
            ReportDataSource rds = new ReportDataSource();

            rds.Name = "ChallanInwardDataSet";
            ReportParameter[] parameters = new ReportParameter[2];
            //parameters[0] = new ReportParameter("FDate", Request.QueryString["Date"].ToString());
            //parameters[1] = new ReportParameter("UDate", Request.QueryString["Date1"].ToString());
            parameters[0] = new ReportParameter("details", lblStoreName.Text);
            parameters[1] = new ReportParameter("Quantity", lblQuantity.Text);
            ReportViewer1.LocalReport.SetParameters(parameters);
            rds.Value = dsReport.Tables[0];
            ReportViewer1.LocalReport.DataSources.Clear();
            ReportViewer1.LocalReport.DataSources.Add(rds);
            ReportViewer1.LocalReport.Refresh();
        }
Exemplo n.º 4
0
    public bool CheckIsLoginTime()
    {
        bool IsLoginTime = false;

        ArrayList date = new ArrayList();

        date = DAL.DALFactory.Instance.DAL_DateAndTime.getDateAndTimeAccordingToZoneTime(drpBranch.SelectedValue);

        //DateTime Currentdt = DateTime.Now;
        //string HrTime = Currentdt.ToString("hh:mm tt");

        string HrTime = date[1].ToString();

        HrTime = HrTime.Remove(4, 3);
        SqlCommand cmd = new SqlCommand();
        DataSet    ds  = new DataSet();

        cmd.CommandText = "sp_BranchMaster";
        cmd.CommandType = CommandType.StoredProcedure;
        cmd.Parameters.AddWithValue("@BranchId", drpBranch.SelectedValue);
        cmd.Parameters.AddWithValue("@CurrentTime", HrTime);
        cmd.Parameters.AddWithValue("@Flag", 15);
        ds = PrjClass.GetData(cmd);
        if (ds.Tables[0].Rows.Count > 0)
        {
            IsLoginTime = Convert.ToBoolean(ds.Tables[0].Rows[0]["loginTime"].ToString());
        }
        return(IsLoginTime);
    }
        protected void Page_Load(object sender, EventArgs e)
        {
            DataSet    ds       = new DataSet();
            SqlCommand cmd      = new SqlCommand();
            DataSet    dsReport = new DataSet();

            cmd             = new SqlCommand();
            cmd.CommandText = "sp_ChallanInwardSummary";
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("BranchId", Globals.BranchID);
            dsReport = PrjClass.GetData(cmd);
            ds       = PrjClass.GetData(cmd);
            // RptChallan.LocalReport.ReportPath = "RDLC/ChallanInward.rdlc";
            ReportDataSource rds = new ReportDataSource();

            rds.Name = "ChallanInwardDataSet_sp_Inward";
            //ReportParameter[] parameters = new ReportParameter[4];
            //parameters[0] = new ReportParameter("FDate", Request.QueryString["Date"].ToString());
            //parameters[1] = new ReportParameter("UDate", Request.QueryString["Date1"].ToString());
            // if (ds.Tables[1].Rows.Count > 0)
            //{
            //for (int i = 0; i < ds.Tables[1].Rows.Count; i++)
            //    lblStoreName.Text += ds.Tables[1].Rows[i]["Item"].ToString();
            //lblQuantity.Text += ds.Tables[2].Rows[0]["QTY"].ToString();
            // }

            //parameters[2] = new ReportParameter("details", lblStoreName.Text);
            //parameters[3] = new ReportParameter("Qty", lblQuantity.Text);

            // ReportViewer2.LocalReport.SetParameters(parameters);
            rds.Value = dsReport.Tables[0];
            //RptChallan.LocalReport.DataSources.Clear();
            //RptChallan.LocalReport.DataSources.Add(rds);
            //RptChallan.LocalReport.Refresh();
        }
        public void bindGrid()
        {
            ObItem.BranchId = Globals.BranchID;
            ObItem.ItemName = drpItemNames.SelectedItem.Text;
            SqlCommand cmd = new SqlCommand();
            DataSet    ds  = new DataSet();

            if (txtCName.Text == "")
            {
                //ds = BAL.BALFactory.Instance.Bal_Report.BindStockReconcile(ObItem);
                if (ds.Tables[0].Rows.Count > 0)
                {
                    grdReport.DataSource = ds;
                    grdReport.DataBind();
                    CalculateGridReport();
                    btnExport1.Visible = true;
                }
                else
                {
                    lblMsg.Text = "No Records Found";
                    //grdReport.Visible = false;
                }
            }
            else
            {
                if (drpItemNames.SelectedItem.Text != "All")
                {
                    cmd.CommandText = "sp_StockReconcile";
                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.AddWithValue("@CustomerCode", hdnCustId.Value);
                    cmd.Parameters.AddWithValue("@ItemName", drpItemNames.SelectedItem.Text);
                    cmd.Parameters.AddWithValue("@BranchId", Globals.BranchID);
                    cmd.Parameters.AddWithValue("@Flag", 7);
                }
                else
                {
                    cmd.CommandText = "sp_StockReconcile";
                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.AddWithValue("@CustomerCode", hdnCustId.Value);
                    cmd.Parameters.AddWithValue("@BranchId", Globals.BranchID);
                    cmd.Parameters.AddWithValue("@Flag", 8);
                }
                ds = PrjClass.GetData(cmd);
                if (ds.Tables[0].Rows.Count > 0)
                {
                    grdReport.DataSource = ds;
                    grdReport.DataBind();
                    ViewState["SavedDS"] = ds;
                    btnExport1.Visible   = true;
                    CalculateGridReport();
                }
                else
                {
                    lblMsg.Text = "No Records Found";
                }
            }
        }
Exemplo n.º 7
0
 public void SetBackup()
 {
     try
     {
         SqlCommand cmd1 = new SqlCommand();
         DataSet    ds1  = new DataSet();
         cmd1.CommandText = "sp_ReceiptConfigSetting";
         cmd1.CommandType = CommandType.StoredProcedure;
         cmd1.Parameters.AddWithValue("@BranchId", Globals.BranchID);
         cmd1.Parameters.AddWithValue("@Flag", 11);
         ds1 = PrjClass.GetData(cmd1);
         string currentDate = DateTime.Now.ToString("ddMMyyyyHHmmss");
         //string fileName = ds1.Tables[0].Rows[0]["backupdrive"].ToString() + "DrySoft" + currentDate + ".bak";
         string filename1 = ds1.Tables[0].Rows[0]["backupdrive"].ToString() + "DCBackup";
         if (Directory.Exists(filename1))
         {
             DirectoryInfo fi    = new DirectoryInfo(filename1);
             FileInfo[]    files = fi.GetFiles("*.bak").Where(p => p.Extension == ".bak").ToArray();
             foreach (FileInfo file in files)
             {
                 try
                 {
                     file.Attributes = FileAttributes.Normal;
                     File.Delete(file.FullName);
                 }
                 catch { }
             }
         }
         else
         {
             DirectoryInfo di = Directory.CreateDirectory(filename1);
         }
         string     fileName = filename1 + "\\" + "DrySoft" + currentDate + ".bak";
         DataSet    ds       = new DataSet();
         SqlCommand cmd      = new SqlCommand();
         cmd.CommandType = CommandType.StoredProcedure;
         cmd.CommandText = "sp_Backup";
         cmd.Parameters.AddWithValue("@fileName", fileName);
         ds = PrjClass.GetData(cmd);
         if (ds.Tables[0].Rows.Count > 0)
         {
             // Session["ReturnMsg"] = "Back Up Created on " + fileName;
             ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "ScriptRegistration", "setDivMouseOver('Green', '#999999');", true);
             lblMsg.Text      = "Back up done successfully at " + fileName;
             Response.Expires = -1;
         }
     }
     catch (Exception ex)
     {
         //   Session["ReturnMsg"] = PrjClass.BackFailMsg;
         ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "ScriptRegistration", "setDivMouseOver('Red', '#999999');", true);
         lblErr.Text      = PrjClass.BackFailMsg;
         Response.Expires = -1;
     }
 }
Exemplo n.º 8
0
        public DataSet RegDatabase()
        {
            SqlCommand cmd = new SqlCommand();
            DataSet    ds  = new DataSet();

            cmd.CommandText = "sp_ExpenseEntryScreen";
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@Flag", 6);
            ds = PrjClass.GetData(cmd);
            return(ds);
        }
Exemplo n.º 9
0
        public DataSet BindShopName()
        {
            SqlCommand CMD = new SqlCommand();
            DataSet    ds  = new DataSet();

            CMD.CommandType = CommandType.StoredProcedure;
            CMD.CommandText = "sp_ChallanInProc";
            CMD.Parameters.AddWithValue("@Flag", 21);
            ds = PrjClass.GetData(CMD);
            return(ds);
        }
Exemplo n.º 10
0
        public DataSet ShowBranch()
        {
            DataSet    ds  = new DataSet();
            SqlCommand cmd = new SqlCommand();

            cmd.CommandText = "sp_BranchMaster";
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@Flag", 7);
            ds = PrjClass.GetData(cmd);
            return(ds);
        }
Exemplo n.º 11
0
        public DataSet BindDropDown()
        {
            SqlCommand CMD = new SqlCommand();
            DataSet    ds  = new DataSet();

            CMD.CommandType = CommandType.StoredProcedure;
            CMD.CommandText = "Proc_Registration";
            CMD.Parameters.AddWithValue("@Flag", 2);
            ds = PrjClass.GetData(CMD);
            return(ds);
        }
Exemplo n.º 12
0
        public DataSet ReadyClothScreenSms(string BID)
        {
            SqlCommand cmd = new SqlCommand();
            DataSet    ds  = new DataSet();

            cmd.CommandText = "Sp_Sel_ChallanScreenSms";
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@BranchId", BID);
            ds = PrjClass.GetData(cmd);
            return(ds);
        }
Exemplo n.º 13
0
        public DataSet BindAllListMaster(string branchId)
        {
            var sqlCommand = new SqlCommand
            {
                CommandText = "sp_ItemWisePriceList",
                CommandType = CommandType.StoredProcedure
            };

            sqlCommand.Parameters.AddWithValue("@BranchId", branchId);
            sqlCommand.Parameters.AddWithValue("@Flag", 6);
            return(PrjClass.GetData(sqlCommand));
        }
Exemplo n.º 14
0
        public DataSet ShowAllReason(DTO.Common Ob)
        {
            SqlCommand cmd = new SqlCommand();
            DataSet    ds  = new DataSet();

            cmd.CommandText = "sp_RemoveReason";
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@BranchId", Ob.BID);
            cmd.Parameters.AddWithValue("@Flag", 3);
            ds = PrjClass.GetData(cmd);
            return(ds);
        }
Exemplo n.º 15
0
        public DataSet fetchpricelist(DTO.NewPriceLists Ob)
        {
            SqlCommand cmd = new SqlCommand();
            DataSet    ds  = new DataSet();

            cmd.CommandText = "sp_itempricelist";
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@BranchId", Ob.BranchId);
            ds = PrjClass.GetData(cmd);
            cmd.Dispose();
            return(ds);
        }
Exemplo n.º 16
0
        public DataSet ShowAllAssignPackage(DTO.PackageMaster Ob)
        {
            DataSet    ds  = new DataSet();
            SqlCommand cmd = new SqlCommand();

            cmd.CommandText = "sp_PackageMaster";
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@BranchId", Ob.BranchId);
            cmd.Parameters.AddWithValue("@Flag", 10);
            ds = PrjClass.GetData(cmd);
            return(ds);
        }
Exemplo n.º 17
0
        public DataSet fetchbarcodeconfig(DTO.Sticker Ob)
        {
            SqlCommand cmd = new SqlCommand();
            DataSet    ds  = new DataSet();

            cmd.CommandText = "stickerdymsetting ";
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@BranchId", Ob.BranchId);
            cmd.Parameters.AddWithValue("@Flag", 7);
            ds = PrjClass.GetData(cmd);
            return(ds);
        }
Exemplo n.º 18
0
        public DataSet ShowAllColor(DTO.Common Ob)
        {
            DataSet    ds  = new DataSet();
            SqlCommand cmd = new SqlCommand();

            cmd.CommandText = "sp_NewColorMaster";
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@BranchId", Ob.BID);
            cmd.Parameters.AddWithValue("@Flag", "3");
            ds = PrjClass.GetData(cmd);
            return(ds);
        }
Exemplo n.º 19
0
        public DataSet FillTextBoxes(DTO.BranchMaster Ob)
        {
            SqlCommand cmd = new SqlCommand();
            DataSet    ds  = new DataSet();

            cmd.CommandText = "sp_BranchMaster";
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@BranchId", Ob.BranchId);
            cmd.Parameters.AddWithValue("@Flag", 4);
            ds = PrjClass.GetData(cmd);
            return(ds);
        }
Exemplo n.º 20
0
        public DataSet GetTodayPending(string Date, string BID)
        {
            DataSet    ds  = new DataSet();
            SqlCommand cmd = new SqlCommand();

            cmd.CommandText = "Sp_DashBoardTodayPending";
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@BookingDate1", Date);
            cmd.Parameters.AddWithValue("@BranchId", BID);
            ds = PrjClass.GetData(cmd);
            return(ds);
        }
Exemplo n.º 21
0
        public DataSet GetCustomerMobileno(string BID)
        {
            SqlCommand cmd = new SqlCommand();
            DataSet    ds  = new DataSet();

            cmd.CommandText = "Proc_Registration";
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@BranchId", BID);
            cmd.Parameters.AddWithValue("@Flag", 17);
            ds = PrjClass.GetData(cmd);
            return(ds);
        }
Exemplo n.º 22
0
        public DataSet ShowAll(DTO.sms Ob)
        {
            SqlCommand cmd = new SqlCommand();
            DataSet    ds  = new DataSet();

            cmd.CommandText = "SP_smsconfig";
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@BranchId", Ob.BranchId);
            cmd.Parameters.AddWithValue("@Flag", 3);
            ds = PrjClass.GetData(cmd);
            return(ds);
        }
Exemplo n.º 23
0
        public DataSet ShowAllCustomer(DTO.Employee Ob)
        {
            DataSet    ds  = new DataSet();
            SqlCommand cmd = new SqlCommand();

            cmd.CommandText = "sp_Dry_EmployeeMaster";
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@BranchId", Ob.BID);
            cmd.Parameters.AddWithValue("@Flag", 3);
            ds = PrjClass.GetData(cmd);
            return(ds);
        }
Exemplo n.º 24
0
        public DataSet BindGrid(DTO.Item Ob)
        {
            DataSet    ds  = new DataSet();
            SqlCommand cmd = new SqlCommand();

            cmd.CommandText = "sp_Item";
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@BranchId", Ob.BranchId);
            cmd.Parameters.AddWithValue("@Flag", "9");
            ds = PrjClass.GetData(cmd);
            return(ds);
        }
Exemplo n.º 25
0
        public DataSet GetTaxDetails(string BID)
        {
            DataSet    ds  = new DataSet();
            SqlCommand cmd = new SqlCommand();

            cmd.CommandText = "sp_BranchMaster";
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@BranchId", BID);
            cmd.Parameters.AddWithValue("@Flag", 9);
            ds = PrjClass.GetData(cmd);
            return(ds);
        }
Exemplo n.º 26
0
        public DataSet DeliveryDetail(string BID, string BNo)
        {
            SqlCommand cmd = new SqlCommand();
            DataSet    ds  = new DataSet();

            cmd.CommandText = "Sp_Sel_BookingDetailsForDelivery";
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@BookingNumber", BNo);
            cmd.Parameters.AddWithValue("@BranchId", BID);
            ds = PrjClass.GetData(cmd);
            return(ds);
        }
Exemplo n.º 27
0
        public DataSet BindRemoveDrop(DTO.Common Ob)
        {
            SqlCommand cmd = new SqlCommand();
            DataSet    ds  = new DataSet();

            cmd.CommandText = "Proc_ReturnChoth";
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@BranchId", Ob.BID);
            cmd.Parameters.AddWithValue("@Flag", 10);
            ds = PrjClass.GetData(cmd);
            return(ds);
        }
Exemplo n.º 28
0
        public DataSet GetuserName(string BID)
        {
            SqlCommand cmd = new SqlCommand();
            DataSet    ds  = new DataSet();

            cmd.CommandText = "sp_UserMaster";
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@BranchId", BID);
            cmd.Parameters.AddWithValue("@Flag", 13);
            ds = PrjClass.GetData(cmd);
            return(ds);
        }
Exemplo n.º 29
0
        public DataSet BindItemDropDown(DTO.Common Ob)
        {
            SqlCommand cmd = new SqlCommand();
            DataSet    ds  = new DataSet();

            cmd.CommandText = "sp_ItemWisePriceList";
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@BranchId", Ob.BID);
            cmd.Parameters.AddWithValue("@Flag", 1);
            ds = PrjClass.GetData(cmd);
            return(ds);
        }
Exemplo n.º 30
0
        public DataSet GetStoreNameAddress(string BID)
        {
            SqlCommand CMD = new SqlCommand();
            DataSet    ds  = new DataSet();

            CMD.CommandType = CommandType.StoredProcedure;
            CMD.CommandText = "Proc_Registration";
            CMD.Parameters.AddWithValue("@Flag", 9);
            CMD.Parameters.AddWithValue("@BranchId", BID);
            ds = PrjClass.GetData(CMD);
            return(ds);
        }