Ejemplo n.º 1
0
    public string VerifyLogin(Admin objAdmin)
    {
        Common_Class _cs      = new Common_Class();
        string       retSatus = "";
        string       ss       = objAdmin.UserId;  // ConfigurationManager.AppSettings["User"].ToString();
        string       dd       = objAdmin.UserPWD; // ConfigurationManager.AppSettings["PWD"].ToString();
        DataSet      ds       = _cs._Get_Dataset("select * from TBL_COMPANY_MST WHERE CMP_EMAIL='" + ss + "' and CMP_PWD='" + dd + "'");

        if (ds.Tables.Count > 0)
        {
            if (ds.Tables[0].Rows.Count > 0)
            {
                //if (objAdmin.UserId == ConfigurationManager.AppSettings["User"].ToString() && objAdmin.UserPWD == ConfigurationManager.AppSettings["PWD"].ToString())
                //{
                retSatus = "SUCCESS";
            }
            else
            {
                retSatus = "FAILED";
            }
        }
        else
        {
            retSatus = "FAILED";
        }
        return(retSatus);
    }
Ejemplo n.º 2
0
    void BindCategory()
    {
        DataSet ds = _cs._Get_Dataset("select * from TBL_ENM_DESIGNATION WHERE ECAT_STS='Y'");

        _cs.BindDropDownList1(ddlType, ds.Tables[0], "ECAT_CODE", "ECAT_NAME", "Login As..");
        ddlType.SelectedValue = "9";
    }
Ejemplo n.º 3
0
    void BInd()
    {
        string  s  = "";
        DataSet ds = cs._Get_Dataset("USP_ATTENDANCE_MST 'USER_DT','" + Session["ID"].ToString());

        for (int x = 0; x < ds.Tables[0].Rows.Count; x++)
        {
            s += "<tr>" +
                 "<td>" + (x + 1).ToString() + "</td>" +
                 "<td>" + ds.Tables[0].Rows[x]["LOG_DT"].ToString() + "</td>" +
                 "<td>" + ds.Tables[0].Rows[x]["duratin"].ToString() + "</td>" +
                 "<td><span class='label label-warning'><a href='WorkSummeryDetails.aspx'>View Details</a></span></td>" +
                 "</tr>";
        }
    }
Ejemplo n.º 4
0
 public DataSet Get_Employee_Customer_Data(string typ)
 {
     return(_cs._Get_Dataset("USP_TBL_EMPLOYEE_CUSTOMER_MST '" + typ + "'"));
 }
Ejemplo n.º 5
0
    public string _ProductPage(string cat_cd, string thePage)
    {
        string  desc = "";
        DataSet ds   = null;

        if (ConfigurationManager.AppSettings["UserType"].ToString() == "All")
        {
            if (cat_cd != "")
            {
                //ds = _cs._Get_Dataset("select top 9 ROW_NUMBER() OVER (ORDER BY PRD_CODE DESC) AS Row,* from VW_TBL_PRODUCT_MST  WHERE PRD_CAT_CD='" + cat_cd + "' order by PRD_CODE DESC");
                ds = _cs._Get_Dataset("select * from (select ROW_NUMBER() OVER (ORDER BY PRD_CODE DESC) AS Rowss,* from (select * from VW_TBL_PRODUCT_MST where PRD_CAT_CD='" + cat_cd + "') x) c");
                if (ds.Tables[0].Rows.Count > 0)
                {
                    desc = "<div style='padding-left:15px;'><b>" + ds.Tables[0].Rows[0]["CAT_NAME"].ToString() + "</b> : " + ds.Tables[0].Rows[0]["CAT_DESC"].ToString() + "</div>";
                }
                else
                {
                    DataSet dss = _cs._Get_Dataset("select * from VW_TBL_CATEGORY_MST WHERE CAT_CODE='" + cat_cd + "' AND CAT_STS='Y'");
                    if (dss.Tables[0].Rows.Count > 0)
                    {
                        desc = "<div style='padding-left:15px;'><b>" + dss.Tables[0].Rows[0]["CAT_NAME"].ToString() + "</b> : No Product(s) Found..</div>";
                    }
                }
            }
            else
            {
                ds = _cs._Get_Dataset("select * from VW_TBL_PRODUCT_MST order by PRD_NAME");
            }
        }
        else
        {
            if (cat_cd != "")
            {
                //ds = _cs._Get_Dataset("select top 9 ROW_NUMBER() OVER (ORDER BY PRD_CODE DESC) AS Row,* from VW_TBL_PRODUCT_MST where CAT_CMP_ID='" + ConfigurationManager.AppSettings["UserType"].ToString() + "' and  PRD_CAT_CD='" + cat_cd + "' order by PRD_CODE DESC");
                ds = _cs._Get_Dataset("select * from (select ROW_NUMBER() OVER (ORDER BY PRD_CODE DESC) AS Rowss,* from (select * from VW_TBL_PRODUCT_MST where CAT_CMP_ID='" + ConfigurationManager.AppSettings["UserType"].ToString() + "' and PRD_CAT_CD='" + cat_cd + "') x) c");
                if (ds.Tables[0].Rows.Count > 0)
                {
                    desc = "<div style='padding-left:15px;'><b>" + ds.Tables[0].Rows[0]["CAT_NAME"].ToString() + "</b> : " + ds.Tables[0].Rows[0]["CAT_DESC"].ToString() + "</div>";
                }
                else
                {
                    DataSet dss = _cs._Get_Dataset("select * from VW_TBL_CATEGORY_MST WHERE CAT_CODE='" + cat_cd + "' AND  CAT_STS='Y'");
                    if (dss.Tables[0].Rows.Count > 0)
                    {
                        desc = "<div style='padding-left:15px;'><b>" + dss.Tables[0].Rows[0]["CAT_NAME"].ToString() + "</b> : No Product(s) Found..</div>";
                    }
                }
            }
            else
            {
                ds = _cs._Get_Dataset("select ROW_NUMBER() OVER (ORDER BY PRD_CODE DESC) AS Row,* from VW_TBL_PRODUCT_MST where CAT_CMP_ID='" + ConfigurationManager.AppSettings["UserType"].ToString() + "' order by PRD_CODE DESC");
            }
        }
        string xx = "";
        string s  = "";
        string ss = "";

        if (ds.Tables[0].Rows.Count > 0)
        {
            for (int x = 0; x < ds.Tables[0].Rows.Count; x++)
            {
                if (ds.Tables[0].Rows[x]["PRD_PAYMENT_MODE"].ToString() == "ONQUERY")
                {
                    s = "<br>Request a Quote.";
                }
                else
                {
                    //s = ds.Tables[0].Rows[x]["CMP_CURRENCY_SYMBOL"].ToString() + ". " + ds.Tables[0].Rows[0]["PRD_AMT"].ToString();
                }
                if (ds.Tables[0].Rows[x]["PRD_STS"].ToString() == "N")
                {
                    s = "<br>OUT OF STOCK";
                }
                if (HttpContext.Current.Session["TYP"] != null)
                {
                    if (HttpContext.Current.Session["TYP"].ToString() == "ADMIN")
                    {
                        ss = "<a href='" + ConfigurationManager.AppSettings["WebName"].ToString() + "Admin/frm_New_Product.aspx?ID=" + ds.Tables[0].Rows[x]["PRD_CODE"].ToString() + "' target='_balnk'><img src='" + WebName() + "images/edit.png' style='width:25px;height:25px;'></a>" + "<a  onclick=showMessage('" + ds.Tables[0].Rows[x]["PRD_CODE"].ToString() + "')><img src='" + WebName() + "images/plus.png' style='width:25px;height:25px;'></a>";
                        // s = "";
                    }
                }
                xx += "<div class='grid_4'>" +
                      "<div class='banner'>" +
                      " <a class='fancybox pr dib' data-fancybox-group='addZoomIcon-showZoomImage' href='" + WebName() + "IMAGE/PRODUCT/" + ds.Tables[0].Rows[x]["CAT_IMG_DIR"].ToString() + "/" + ds.Tables[0].Rows[x]["PRD_IMG"].ToString() + "' title='" + ds.Tables[0].Rows[0]["CAT_NAME"].ToString() + " - " + ds.Tables[0].Rows[x]["PRD_NAME"].ToString() + "'>" +
                      "<img style='width:300px;height:425px' data-src='" + WebName() + "IMAGE/PRODUCT/" + ds.Tables[0].Rows[x]["CAT_IMG_DIR"].ToString() + "/" + ds.Tables[0].Rows[x]["PRD_IMG"].ToString() + "' src='" + WebName() + "images/default.gif' alt=''></a>" +
                      "<div class='label'>" +
                      //  "<img style='width:300px;height:425px' src='" + WebName() + "IMAGE/PRODUCT/" + ds.Tables[0].Rows[x]["CAT_IMG_DIR"].ToString() + "/" + ds.Tables[0].Rows[x]["PRD_IMG"].ToString() + "' alt=''></a>" +
                      //"<div class='label'>" +
                      "<div class='price'>" + ss + "</div>" +
                      "<a href='ProductDetails.aspx?PRID=" + ds.Tables[0].Rows[x]["PRD_CODE"].ToString() + "'><b>" + ds.Tables[0].Rows[x]["PRD_NAME"].ToString() + "</b>" + s + "</a>" +
                      "</div>" +
                      "   <div style='display:none;'>";
                if (ds.Tables[0].Rows[x]["PRD_IMG_CODE"].ToString() != "")
                {
                    DataSet DSS = _cs._Get_Dataset("SELECT * FROM TBL_PRODUCT_IMAGE_INF WHERE PRIMG_PRD_CD='" + ds.Tables[0].Rows[x]["PRD_IMG_CODE"].ToString() + "'");

                    for (int c = 0; c < DSS.Tables[0].Rows.Count; c++)
                    {
                        xx += " <a class='fancybox pr dib' data-fancybox-group='addZoomIcon-showZoomImage' href='" + WebName() + "IMAGE/PRODUCT/" + ds.Tables[0].Rows[x]["CAT_IMG_DIR"].ToString() + "/" + DSS.Tables[0].Rows[c]["PRIIMG_IMG"].ToString() + "' title='" + ds.Tables[0].Rows[x]["PRD_NAME"].ToString() + "'></a>";
                    }
                }

                xx += "</div>" +
                      "</div>" +
                      "</div>";
            }
        }
        if (cat_cd != "")
        {
            return(desc + "<br>" + xx + "|9");
        }
        else
        {
            return(desc + "<br>" + xx);
        }
    }