Beispiel #1
0
    private void SaveDataIntoDB(string strName, string path, int flag)
    {
        clsMySQLCoreApp ObjDAL = new clsMySQLCoreApp();

        ObjDAL.SetStoreProcedureData("ParmPID", MySql.Data.MySqlClient.MySqlDbType.Int32, ProductID);
        ObjDAL.SetStoreProcedureData("ParmPath ", MySql.Data.MySqlClient.MySqlDbType.VarChar, path);
        ObjDAL.SetStoreProcedureData("ParmFileName  ", MySql.Data.MySqlClient.MySqlDbType.VarChar, strName);
        ObjDAL.SetStoreProcedureData("ParmFlag", MySql.Data.MySqlClient.MySqlDbType.Int32, flag);
        ObjDAL.ExecuteStoreProcedure_DML("spr_InsertProductImages");
    }
Beispiel #2
0
    private void UpdateProductData()
    {
        ProductName = Request["txtProductName"].ToString();
        string strProdDesc    = Request["txtProdDesc"].ToString();
        string strConsFeature = Request["txtConsFeature"].ToString();
        string strSizeDetails = Request["txtSizeDetails"].ToString();
        string strProductName = "";
        int    ProductID      = 0;

        if (Session["ProductName"] != null)
        {
            strProductName = Session["ProductName"].ToString();
        }
        else
        {
            strProductName = "NA";
        }

        if (Session["ProductID"] != null)
        {
            ProductID = Convert.ToInt32(Session["ProductID"]);
        }

        clsMySQLCoreApp ObjDAL = new clsMySQLCoreApp();

        ObjDAL.SetStoreProcedureData("ProductName", MySql.Data.MySqlClient.MySqlDbType.VarChar, ProductName);
        ObjDAL.SetStoreProcedureData("PID", MySql.Data.MySqlClient.MySqlDbType.Int32, ProductID);
        ObjDAL.SetStoreProcedureData("Description", MySql.Data.MySqlClient.MySqlDbType.LongText, strProdDesc);
        ObjDAL.SetStoreProcedureData("ConstFeatures", MySql.Data.MySqlClient.MySqlDbType.LongText, strConsFeature);
        ObjDAL.SetStoreProcedureData("SizeDetails", MySql.Data.MySqlClient.MySqlDbType.LongText, strSizeDetails);
        bool result = ObjDAL.ExecuteStoreProcedure_DML("spr_InsUpdateProductDetails");

        if (!result)
        {
            Response.Write(ObjDAL.strErrorText);
        }
        else
        {
            Session["UpdateStatus"] = "1";
            Response.Redirect("Admin_Manager.aspx");
        }
    }