예제 #1
0
    public static List <ListItem> GetAdminProductPatnerRelationshipForPatner()
    {
        using (cmd = new SqlCommand())
        {
            List <ListItem> type = new List <ListItem>();
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.CommandText = "sp_AdminDropdownDistributerOrReseller";
            cmd.Connection  = Getconnected.getconnecting();
            using (sdr = cmd.ExecuteReader())
            {
                type.Add(new ListItem {
                    Text = "Select Patner"
                });
                while (sdr.Read())
                {
                    type.Add(new ListItem
                    {
                        Value = sdr[0].ToString(),
                        Text  = sdr[1].ToString()
                    });
                }
            }

            return(type);
        }
    }
예제 #2
0
    public static List <ListItem> GetAdminDropdownInwordno_ShowReason_9()
    {
        using (cmd = new SqlCommand())
        {
            List <ListItem> type = new List <ListItem>();
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.CommandText = "sp_AdminDropdownInwordno_ShowReason_9";
            cmd.Connection  = Getconnected.getconnecting();
            using (sdr = cmd.ExecuteReader())
            {
                type.Add(new ListItem {
                    Text = "Select Inword No"
                });
                while (sdr.Read())
                {
                    type.Add(new ListItem
                    {
                        Value = sdr[0].ToString(),
                        Text  = sdr[1].ToString()
                    });
                }
            }

            return(type);
        }
    }
예제 #3
0
    public static List <ListItem> GetAdminTierLevelDistributerForEdit()
    {
        using (cmd = new SqlCommand())
        {
            List <ListItem> type = new List <ListItem>();
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.CommandText = "sp_AdminDropdownTierLevelDistributerForEdit";
            cmd.Connection  = Getconnected.getconnecting();
            using (sdr = cmd.ExecuteReader())
            {
                type.Add(new ListItem {
                    Text = "Select Distributer For Edit"
                });
                while (sdr.Read())
                {
                    type.Add(new ListItem
                    {
                        Value = sdr[0].ToString(),
                        Text  = sdr[1].ToString()
                    });
                }
            }

            return(type);
        }
    }
예제 #4
0
    public string getattendance()
    {
        string data = "";

        using (cmd = new SqlCommand())
        {
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.CommandText = "sp_SprintDashboard_PendingShipment_WeeklyReport";
            cmd.Connection  = Getconnected.getconnecting();
            using (sdr = cmd.ExecuteReader())
            {
                if (sdr.HasRows)
                {
                    while (sdr.Read())
                    {
                        int    sno        = Convert.ToInt16(sdr[0]);
                        string shipmentid = Convert.ToString(sdr[1]);
                        string receivedon = Convert.ToDateTime(sdr[2]).ToLongDateString();
                        //string outwarddatetime = Convert.ToDateTime(sdr[3]).ToLongDateString() + " " + Convert.ToDateTime(sdr[3]).ToShortTimeString();
                        string rider    = Convert.ToString(sdr[3]);
                        string District = Convert.ToString(sdr[4]);
                        string City     = Convert.ToString(sdr[5]);
                        data += "<tr><td>" + sno + "</td><td>" + shipmentid + "</td><td>" + receivedon + "</td><td>"
                                + rider + "</td><td>" + District + "</td><td>" + City + "</td></tr>";
                    }
                }
            }
            return(data);
        }
    }
예제 #5
0
    public static List <ListItem> GetAdminOutwardScanningForm_EmployeeName()
    {
        using (cmd = new SqlCommand())
        {
            List <ListItem> type = new List <ListItem>();
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.CommandText = "sp_AdminDropdownOutwardHistoryEmployee";
            cmd.Connection  = Getconnected.getconnecting();
            using (sdr = cmd.ExecuteReader())
            {
                type.Add(new ListItem {
                    Text = "Select Employee Name"
                });
                while (sdr.Read())
                {
                    type.Add(new ListItem
                    {
                        Value = sdr[0].ToString(),
                        Text  = sdr[1].ToString()
                    });
                }
            }

            return(type);
        }
    }
예제 #6
0
    public static List <ListItem> GetAdminPatnerBranchFormCity()
    {
        using (cmd = new SqlCommand())
        {
            List <ListItem> type = new List <ListItem>();
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.CommandText = "sp_AdminDropdownCity";
            cmd.Connection  = Getconnected.getconnecting();
            using (sdr = cmd.ExecuteReader())
            {
                type.Add(new ListItem {
                    Text = "Select City For New Branch"
                });
                while (sdr.Read())
                {
                    type.Add(new ListItem
                    {
                        Value = sdr[0].ToString(),
                        Text  = sdr[1].ToString()
                    });
                }
            }

            return(type);
        }
    }
예제 #7
0
    public string getattendance()
    {
        string data = "";

        using (cmd = new SqlCommand())
        {
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.CommandText = "sp_DataEntryStep6";
            cmd.Connection  = Getconnected.getconnecting();
            using (sdr = cmd.ExecuteReader())
            {
                if (sdr.HasRows)
                {
                    while (sdr.Read())
                    {
                        int    sno             = Convert.ToInt16(sdr[0]);
                        string inword          = Convert.ToString(sdr[1]);
                        string outwarddatetime = Convert.ToDateTime(sdr[2]).ToLongDateString() + " " + Convert.ToDateTime(sdr[2]).ToShortTimeString();
                        string noofnewid       = Convert.ToString(sdr[3]);
                        string discription     = Convert.ToString(sdr[4]);
                        string reason          = Convert.ToString(sdr[5]);
                        string user            = Convert.ToString(sdr[6]);
                        data += "<tr><td>" + sno + "</td><td>" + inword + "</td><td>"
                                + outwarddatetime + "</td><td>" + noofnewid + "</td><td>" + discription + "</td><td>" + reason + "</td><td>"
                                + user + "</td></tr>";
                    }
                }
            }
            return(data);
        }
    }
예제 #8
0
    public void DistributerCard(Properties P)
    {
        try
        {
            using (cmd = new SqlCommand())
            {
                cmd.CommandType = CommandType.StoredProcedure;
                cmd.CommandText = "sp_UI_Distributer_MainPage";
                cmd.Connection  = Getconnected.getconnecting();
                using (sdr = cmd.ExecuteReader())
                {
                    if (sdr.HasRows)
                    {
                        while (sdr.Read())
                        {
                            System.Web.UI.HtmlControls.HtmlGenericControl div1 = new System.Web.UI.HtmlControls.HtmlGenericControl("div");
                            div1.Attributes["class"] = "col-md-3 mt-30";
                            P.MyProperty.Controls.Add(div1);



                            System.Web.UI.HtmlControls.HtmlGenericControl div2 = new System.Web.UI.HtmlControls.HtmlGenericControl("div");
                            div2.Attributes["class"] = "border mt-30";
                            div1.Controls.Add(div2);


                            System.Web.UI.HtmlControls.HtmlImage timerimag = new System.Web.UI.HtmlControls.HtmlImage();
                            timerimag.Attributes["class"] = "img-responsive";
                            //timerimag.Attributes["Width"] = "60px";
                            timerimag.Attributes["Height"] = "30%";
                            //timerimag.Width = 53;
                            timerimag.Height = 53;
                            timerimag.Src    = sdr[2].ToString() + sdr[1].ToString();
                            timerimag.Alt    = sdr[2].ToString();
                            div2.Controls.Add(timerimag);


                            //System.Web.UI.HtmlControls.HtmlGenericControl timerspan = new System.Web.UI.HtmlControls.HtmlGenericControl("br");
                            //timerspan.InnerText = "Locations : Karachi,Islamabad,Lahore";
                            //div2.Controls.Add(timerspan);

                            System.Web.UI.HtmlControls.HtmlGenericControl p2 = new System.Web.UI.HtmlControls.HtmlGenericControl("p");

                            StringBuilder sb = new StringBuilder();
                            sb.Append("Tier Level : 1");
                            sb.AppendLine("<br>");
                            sb.Append("Locations : Karachi, Lahore, Islamabad");
                            sb.AppendLine("<br>");
                            sb.Append(sdr[3].ToString().Replace("https://", "www."));
                            sb.AppendLine("<br>");
                            sb.Append("Patner Status : " + sdr[4].ToString());
                            p2.InnerHtml = sb.ToString();
                            div2.Controls.Add(p2);
                        }
                    }
                }
            }
        }
        catch (Exception ex) { }
    }
예제 #9
0
    public string getattendance()
    {
        string data = "";

        using (cmd = new SqlCommand())
        {
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.CommandText = "sp_SprintDashboardTotalDistrictReport";
            cmd.Connection  = Getconnected.getconnecting();
            using (sdr = cmd.ExecuteReader())
            {
                if (sdr.HasRows)
                {
                    while (sdr.Read())
                    {
                        int    sno      = Convert.ToInt16(sdr[0]);
                        string District = Convert.ToString(sdr[1]);
                        string AddedOn  = Convert.ToDateTime(sdr[2]).ToLongDateString();
                        //string outwarddatetime = Convert.ToDateTime(sdr[3]).ToLongDateString() + " " + Convert.ToDateTime(sdr[3]).ToShortTimeString();

                        data += "<tr><td>" + sno + "</td><td>" + District + "</td><td>" + AddedOn + "</td></tr>";
                    }
                }
            }
            return(data);
        }
    }
예제 #10
0
    public static List <ListItem> GetAdminDropdowncountry(Properties P)
    {
        using (cmd = new SqlCommand())
        {
            List <ListItem> type = new List <ListItem>();
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.CommandText = "sp_fetchcountry";
            cmd.Connection  = Getconnected.getconnecting();
            cmd.Parameters.AddWithValue("@id", P.AdminFetchID);
            using (sdr = cmd.ExecuteReader())
            {
                type.Add(new ListItem {
                    Text = "Select Country"
                });
                while (sdr.Read())
                {
                    type.Add(new ListItem
                    {
                        Value = sdr[0].ToString(),
                        Text  = sdr[1].ToString()
                    });
                }
            }

            return(type);
        }
    }
예제 #11
0
    public static List <ListItem> GetSprintDashboardDropdownReturnReason()
    {
        using (cmd = new SqlCommand())
        {
            List <ListItem> type = new List <ListItem>();
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.CommandText = "sp_SprintDashboardDropdownReturnReason";
            cmd.Connection  = Getconnected.getconnecting();
            using (sdr = cmd.ExecuteReader())
            {
                type.Add(new ListItem {
                    Text = "Select Reason"
                });
                while (sdr.Read())
                {
                    type.Add(new ListItem
                    {
                        Value = sdr[0].ToString(),
                        Text  = sdr[1].ToString()
                    });
                }
            }

            return(type);
        }
    }
예제 #12
0
    public string getattendance()
    {
        string data = "";

        using (cmd = new SqlCommand())
        {
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.CommandText = "sp_DataEntryStep1";
            cmd.Connection  = Getconnected.getconnecting();
            using (sdr = cmd.ExecuteReader())
            {
                if (sdr.HasRows)
                {
                    while (sdr.Read())
                    {
                        int    sno        = Convert.ToInt16(sdr[0]);
                        string inword     = Convert.ToString(sdr[1]);
                        string inworddate = Convert.ToDateTime(sdr[2]).ToLongDateString();
                        string noofids    = Convert.ToString(sdr[3]);
                        string noofpages  = Convert.ToString(sdr[4]);
                        string department = Convert.ToString(sdr[5]);
                        string reson      = Convert.ToString(sdr[6]);
                        string user       = Convert.ToString(sdr[7]);
                        data += "<tr><td>" + sno + "</td><td>" + inword + "</td><td>" + inworddate + "</td><td>"
                                + noofids + "</td><td>" + noofpages + "</td><td>" + department + "</td><td>" + reson + "</td><td>"
                                + user + "</td></tr>";
                    }
                }
            }
            return(data);
        }
    }
예제 #13
0
 public void AdminInsertreturnreason(Properties P)
 {
     using (cmd = new SqlCommand())
     {
         cmd.CommandType = CommandType.StoredProcedure;
         cmd.CommandText = "sp_insertreturnreason";
         cmd.Connection  = Getconnected.getconnecting();
         cmd.Parameters.AddWithValue("@Reason", P.AdminInsertreasonreason);
         cmd.Parameters.AddWithValue("@FK_Createdon", P.AdminInsertreasoncreateon);
         cmd.ExecuteNonQuery();
     }
 }
예제 #14
0
 // sprint dashboard area start //
 public void SprintInsertCountry(Properties P)
 {
     using (cmd = new SqlCommand())
     {
         cmd.CommandType = CommandType.StoredProcedure;
         cmd.CommandText = "sp_insertcountry";
         cmd.Connection  = Getconnected.getconnecting();
         cmd.Parameters.AddWithValue("@Country", P.SprintInsertCountry_CountryName);
         cmd.Parameters.AddWithValue("@FK_Createdon", P.SprintInsertCountry_FK_Createdby);
         cmd.ExecuteNonQuery();
     }
 }
예제 #15
0
 public void AdminInsertdistrict(Properties P)
 {
     using (cmd = new SqlCommand())
     {
         cmd.CommandType = CommandType.StoredProcedure;
         cmd.CommandText = "sp_insertdistrict";
         cmd.Connection  = Getconnected.getconnecting();
         cmd.Parameters.AddWithValue("@District", P.AdminInsertdistrictdistrict);
         cmd.Parameters.AddWithValue("@FK_City", P.AdminInserdistrictcity);
         cmd.Parameters.AddWithValue("@FK_Createdon", P.AdminInsertdistrictcreated);
         cmd.ExecuteNonQuery();
     }
 }
예제 #16
0
 public void SprintInsertUserInfo(Properties P)
 {
     using (cmd = new SqlCommand())
     {
         cmd.CommandType = CommandType.StoredProcedure;
         cmd.CommandText = "sp_insertuser";
         cmd.Connection  = Getconnected.getconnecting();
         cmd.Parameters.AddWithValue("@email", P.SprintInsertUserInfo_email);
         cmd.Parameters.AddWithValue("@password", P.SprintInsertUserInfo_Password);
         cmd.Parameters.AddWithValue("@role", P.SprintInsertUserInfo_Role);
         cmd.ExecuteNonQuery();
     }
 }
예제 #17
0
 public void SprintUpdateReturnReason(Properties P)
 {
     using (cmd = new SqlCommand())
     {
         cmd.CommandType = CommandType.StoredProcedure;
         cmd.CommandText = "sp_updatereturnreason";
         cmd.Connection  = Getconnected.getconnecting();
         cmd.Parameters.AddWithValue("@id", P.SprintUpdateReturnReason_ID);
         cmd.Parameters.AddWithValue("@reason", P.SprintUpdateReturnReason_Reason);
         cmd.Parameters.AddWithValue("@FK_Updatedon", P.SprintUpdateReturnReason_FK_Updatedby);
         cmd.ExecuteNonQuery();
     }
 }
예제 #18
0
 public void SprintUpdateDistrict(Properties P)
 {
     using (cmd = new SqlCommand())
     {
         cmd.CommandType = CommandType.StoredProcedure;
         cmd.CommandText = "sp_Update_District";
         cmd.Connection  = Getconnected.getconnecting();
         cmd.Parameters.AddWithValue("@id", P.SprintUpdateDistrict_ID);
         cmd.Parameters.AddWithValue("@district", P.SprintUpdateDistrict_DistrictName);
         cmd.Parameters.AddWithValue("@FK_Updateon", P.SprintUpdateDistrict_FK_Updatedby);
         cmd.ExecuteNonQuery();
     }
 }
예제 #19
0
 public void SprintUpdateCity(Properties P)
 {
     using (cmd = new SqlCommand())
     {
         cmd.CommandType = CommandType.StoredProcedure;
         cmd.CommandText = "sp_updatecity";
         cmd.Connection  = Getconnected.getconnecting();
         cmd.Parameters.AddWithValue("@id", P.SprintUpdateCity_ID);
         cmd.Parameters.AddWithValue("@city", P.SprintUpdateCity_CityName);
         cmd.Parameters.AddWithValue("@FK_Updateon", P.SprintUpdateCity_FK_Updatedby);
         cmd.ExecuteNonQuery();
     }
 }
예제 #20
0
 public void AdminUpdateCountry(Properties P)
 {
     using (cmd = new SqlCommand())
     {
         cmd.CommandType = CommandType.StoredProcedure;
         cmd.CommandText = "sp_updatecountry";
         cmd.Connection  = Getconnected.getconnecting();
         cmd.Parameters.AddWithValue("@country", P.AdminUpdatecountrycountry);
         cmd.Parameters.AddWithValue("@FK_Updatedon", P.AdminUpdatecountryupdatedby);
         cmd.Parameters.AddWithValue("@id", P.AdminUpdatecountryID);
         cmd.ExecuteNonQuery();
     }
 }
예제 #21
0
 public void AdminInsertdeliveredstep(Properties P)
 {
     using (cmd = new SqlCommand())
     {
         cmd.CommandType = CommandType.StoredProcedure;
         cmd.CommandText = "sp_insertdeliveredstep";
         cmd.Connection  = Getconnected.getconnecting();
         cmd.Parameters.AddWithValue("@deliveredon", P.AdminInsertdelivereddeliveredon);
         cmd.Parameters.AddWithValue("@FK_Rider", P.AdminInsertdeliveredRider);
         cmd.Parameters.AddWithValue("@FK_Shipment", P.AdminInsertdeliveredshipment);
         cmd.Parameters.AddWithValue("@FK_Createdby", P.AdminInsertdeliveredcreatedby);
         cmd.ExecuteNonQuery();
     }
 }
예제 #22
0
    public DataTable AdminFetchPostingVoucher()
    {
        DataTable table = new DataTable();

        using (cmd = new SqlCommand())
        {
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.CommandText = "sp_AdminPosting_Today";
            cmd.Connection  = Getconnected.getconnecting();
            SqlDataAdapter sda = new SqlDataAdapter(cmd);
            sda.Fill(table);
            return(table);
        }
    }
예제 #23
0
    public DataTable AdminFetchcOCompleteDaily()
    {
        DataTable table = new DataTable();

        using (cmd = new SqlCommand())
        {
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.CommandText = "AdminCompleteConsumerCO_Today";
            cmd.Connection  = Getconnected.getconnecting();
            SqlDataAdapter sda = new SqlDataAdapter(cmd);
            sda.Fill(table);
            return(table);
        }
    }
예제 #24
0
 public void SprintUpdateUser(Properties P)
 {
     using (cmd = new SqlCommand())
     {
         cmd.CommandType = CommandType.StoredProcedure;
         cmd.CommandText = "sp_updateuserinfo";
         cmd.Connection  = Getconnected.getconnecting();
         cmd.Parameters.AddWithValue("@id", P.SprintUpdateUserInfo_ID);
         cmd.Parameters.AddWithValue("@email", P.SprintUpdateUserInfo_Email);
         cmd.Parameters.AddWithValue("@password", P.SprintUpdateUserInfo_Password);
         //cmd.Parameters.AddWithValue("@role", P.AdminUpdateuserrole);
         cmd.ExecuteNonQuery();
     }
 }
예제 #25
0
    public DataTable AdminFetchChargeParkingSuspendedTable()
    {
        DataTable table = new DataTable();

        using (cmd = new SqlCommand())
        {
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.CommandText = "AdminChargeParkingConsumerSameTable_Today";
            cmd.Connection  = Getconnected.getconnecting();
            SqlDataAdapter sda = new SqlDataAdapter(cmd);
            sda.Fill(table);
            return(table);
        }
    }
예제 #26
0
 public void AdminUpdateDistrict(Properties P)
 {
     using (cmd = new SqlCommand())
     {
         cmd.CommandType = CommandType.StoredProcedure;
         cmd.CommandText = "sp_updatedistrict";
         cmd.Connection  = Getconnected.getconnecting();
         cmd.Parameters.AddWithValue("@district", P.AdminUpdatedistrictdistrict);
         cmd.Parameters.AddWithValue("@FK_City", P.AdminUpdatedistrictupdatedby);
         cmd.Parameters.AddWithValue("@FK_Updateon", P.AdminUpdatedistrictcity);
         cmd.Parameters.AddWithValue("@id", P.AdminUpdateDistrictID);
         cmd.ExecuteNonQuery();
     }
 }
예제 #27
0
    public DataTable AdminFetchSearchingSheetBill()
    {
        DataTable table = new DataTable();

        using (cmd = new SqlCommand())
        {
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.CommandText = "AdminSearchingSheetConsumer_Today";
            cmd.Connection  = Getconnected.getconnecting();
            SqlDataAdapter sda = new SqlDataAdapter(cmd);
            sda.Fill(table);
            return(table);
        }
    }
예제 #28
0
    public DataTable AdminAddPatnerNewTypeFetch(Properties P)
    {
        DataTable table = new DataTable();

        using (cmd = new SqlCommand())
        {
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.CommandText = "sp_AdminFetchPatnerTypeRelation";
            cmd.Connection  = Getconnected.getconnecting();
            cmd.Parameters.AddWithValue("@FK_Patner", P.AdminPatnerTypeRelationFetch);
            SqlDataAdapter sda = new SqlDataAdapter(cmd);
            sda.Fill(table);
            return(table);
        }
    }
예제 #29
0
    public DataTable DistributerAddProductForm(Properties P)
    {
        DataTable table = new DataTable();

        using (cmd = new SqlCommand())
        {
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.CommandText = "sp_DistributerFetchProduct";
            cmd.Connection  = Getconnected.getconnecting();
            cmd.Parameters.AddWithValue("@PID", P.DistributerAddProductFetch);
            SqlDataAdapter sda = new SqlDataAdapter(cmd);
            sda.Fill(table);
            return(table);
        }
    }
예제 #30
0
    public DataTable AdminEditServiceFetch(Properties P)
    {
        DataTable table = new DataTable();

        using (cmd = new SqlCommand())
        {
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.CommandText = "sp_AdminFetchService";
            cmd.Connection  = Getconnected.getconnecting();
            cmd.Parameters.AddWithValue("@PSID", P.AdminEditServiceFetch);
            SqlDataAdapter sda = new SqlDataAdapter(cmd);
            sda.Fill(table);
            return(table);
        }
    }