Пример #1
0
    public void BindDDLVendorBySpare(Label lblrateSAP)
    {
        DataSet ds = new DataSet();

        SqlParameter[] param =
        {
            new SqlParameter("@Type",            "SELECT_ALL_VENDOR_ACCORDINGTO_SPARE"),
            new SqlParameter("@ProductDivision", this._ProductDivision_Id),
            new SqlParameter("@SpareId",         this._SpareId)
        };

        ds = objSql.ExecuteDataset(CommandType.StoredProcedure, "uspSparePurchaseOutside", param);
        //if (ds.Tables[0].Rows.Count > 0)
        //{
        //    ddl.DataSource = ds.Tables[0];
        //    ddl.DataValueField = "Vendor_Id";
        //    ddl.DataTextField = "Vendor_Name";
        //    ddl.DataBind();
        //    ddl.Items.Insert(0, new ListItem("Select", "0"));
        //}
        //else
        //{
        //    ddl.Items.Clear();
        //    ddl.Items.Insert(0, new ListItem("Select", "0"));
        //}
        lblrateSAP.Text = Convert.ToString(ds.Tables[1].Rows[0][0]);
    }
    // modified 4 nov bhawesh
    public void  BindComplaintData(GridView gv, String Type)
    {
        DataSet dsComplaintData = new DataSet();

        SqlParameter[] sqlParamS =
        {
            new SqlParameter("@DefId",      this.DefId),
            new SqlParameter("@challan_no", this.challanno),
            new SqlParameter("@Type",       Type)
        };
        //Getting values of Complaint to bind complaint drop downlist using SQL Data Access Layer
        dsComplaintData = objsql.ExecuteDataset(CommandType.StoredProcedure, "uspChallanPrintScreen", sqlParamS);
        if (dsComplaintData.Tables[0].Rows.Count > 0)
        {
            dsComplaintData.Tables[0].Columns.Add("Sno");
            int intCommon    = 1;
            int intCommonCnt = dsComplaintData.Tables[0].Rows.Count;
            for (int intCnt = 0; intCnt < intCommonCnt; intCnt++)
            {
                dsComplaintData.Tables[0].Rows[intCnt]["Sno"] = intCommon;
                intCommon++;
            }
            gv.DataSource = dsComplaintData;
            gv.DataBind();
        }

        dsComplaintData = null;
        sqlParamS       = null;
    }
    public void BindASC(DropDownList ddlAsc)
    {
        DataSet dsASC = new DataSet();

        SqlParameter[] sqlParamS =
        {
            new SqlParameter("@CGuser", this.CGuser),
            new SqlParameter("@Type",   "GET_ASC_NAME")
        };
        dsASC = objsql.ExecuteDataset(CommandType.StoredProcedure, "uspDestructibleSpareAndServiceActivityList", sqlParamS);
        //if (dsASC.Tables[0].Rows.Count > 0)
        //{
        //    this.ASC = dsASC.Tables[0].Rows[0]["sc_name"].ToString();

        //}
        ddlAsc.DataSource     = dsASC;
        ddlAsc.DataTextField  = "SC_Name";
        ddlAsc.DataValueField = "sc_sno";

        ddlAsc.DataBind();
        ddlAsc.Items.Insert(0, new ListItem("Select", "0"));

        dsASC     = null;
        sqlParamS = null;
    }
Пример #4
0
    public void Bind_SELECTED_ASC_SPEC_SPARE(int intASCSpareId, string strType)
    {
        DataSet dsASC = new DataSet();

        SqlParameter[] sqlParamG =
        {
            new SqlParameter("@Type",              strType),
            new SqlParameter("@ASC_Spec_Spare_Id", intASCSpareId)
        };

        dsASC = objSql.ExecuteDataset(CommandType.StoredProcedure, "uspASCSpecificSpareMaster", sqlParamG);
        if (dsASC.Tables[0].Rows.Count > 0)
        {
            ASC_Spec_Spare_Id      = int.Parse(dsASC.Tables[0].Rows[0]["ASC_Spec_Spare_Id"].ToString());
            ASC_Id                 = Convert.ToInt32(dsASC.Tables[0].Rows[0]["ASC_Id"].ToString());
            Loc_Id                 = Convert.ToInt32(dsASC.Tables[0].Rows[0]["Loc_Id"].ToString());
            ProductDivision_Id     = Convert.ToInt32(dsASC.Tables[0].Rows[0]["ProductDivision_Id"].ToString());
            Spare_Id               = Convert.ToInt32(dsASC.Tables[0].Rows[0]["Spare_Id"].ToString());
            Lead_Time              = dsASC.Tables[0].Rows[0]["Lead_Time"].ToString();
            AVGConsumption_Per_Day = dsASC.Tables[0].Rows[0]["AVGConsumption_Per_Day"].ToString();
            Safety_Percentage      = dsASC.Tables[0].Rows[0]["Safety_Percentage"].ToString();
            Reorder_Trigger        = dsASC.Tables[0].Rows[0]["Reorder_Trigger"].ToString();
            Recommended_Stock      = dsASC.Tables[0].Rows[0]["Recommended_Stock"].ToString();
            Order_Quantity         = dsASC.Tables[0].Rows[0]["Order_Quantity"].ToString();
            Min_Order_Quantity     = dsASC.Tables[0].Rows[0]["Min_Order_Quantity"].ToString();
            ActiveFlag             = dsASC.Tables[0].Rows[0]["Active_Flag"].ToString();
        }
        dsASC = null;
    }
Пример #5
0
 //Bind records of cost centers mapped with product divisions based on search criteria's
 public void BindGridSAPCostCenterMasterSearch(GridView gvComm, Label lblRowCount)
 {
     SqlParameter[] sqlParamSrh =
     {
         new SqlParameter("@MessageOut",     SqlDbType.VarChar,    1000),
         new SqlParameter("@Return_Value",   SqlDbType.Int),
         new SqlParameter("@Active_Flag",    this.Active_Flag),
         new SqlParameter("@SearchCriteria", this.SearchCriteria),
         new SqlParameter("@ColumnName",     this.ColumnName),
         new SqlParameter("@SortColumnName", this.SortColumnName),
         new SqlParameter("@SortOrder",      this.SortOrder),
         new SqlParameter("@Type",           "SEARCH")
     };
     sqlParamSrh[0].Direction = ParameterDirection.Output;
     sqlParamSrh[1].Direction = ParameterDirection.ReturnValue;
     dsCommon    = objSqlDAL.ExecuteDataset(CommandType.StoredProcedure, "uspSAPCostCenter", sqlParamSrh);
     ReturnValue = Convert.ToInt32(sqlParamSrh[1].Value.ToString());
     MessageOut  = sqlParamSrh[0].Value.ToString();
     if (ReturnValue != -1)
     {
         gvComm.DataSource = dsCommon;
         gvComm.DataBind();
         lblRowCount.Text = dsCommon.Tables[0].Rows.Count.ToString();
     }
     dsCommon = null;
 }
Пример #6
0
    public DataSet BindSalesOrderHistoryLog(string strPO_Number)
    {
        DataSet ds = new DataSet();

        SqlParameter[] sqlParam =
        {
            new SqlParameter("@MessageOut",   SqlDbType.NVarChar, 1000),
            new SqlParameter("@Return_Value", SqlDbType.Int),
            new SqlParameter("@PO_Number",    strPO_Number),
            new SqlParameter("@Type",         "SELECT_SALES_ORDER_ACTIVITY_LOG")
        };
        sqlParam[0].Direction = ParameterDirection.Output;
        sqlParam[1].Direction = ParameterDirection.ReturnValue;
        ds = objSql.ExecuteDataset(CommandType.StoredProcedure, "uspSalesOrderReceipts", sqlParam);
        this.ReturnValue = int.Parse(sqlParam[1].Value.ToString());
        if (int.Parse(sqlParam[1].Value.ToString()) == -1)
        {
            this.MessageOut = sqlParam[0].Value.ToString();
        }
        sqlParam     = null;
        intCommonCnt = ds.Tables[0].Rows.Count;
        if (intCommonCnt > 0)
        {
            ds.Tables[0].Columns.Add("Sno");
            intCommon = 1;
            for (intCnt = 0; intCnt < intCommonCnt; intCnt++)
            {
                ds.Tables[0].Rows[intCnt]["Sno"] = intCommon;
                intCommon++;
            }
        }
        return(ds);
    }
Пример #7
0
    public void GetBillNo()
    {
        DataSet dsbillno = new DataSet();

        SqlParameter[] sqlParam =
        {
            new SqlParameter("@Type", "GENERATE_INTERNAL_BILL_NUMBER")
        };
        dsbillno = objsql.ExecuteDataset(CommandType.StoredProcedure, "uspPrintInternalBill", sqlParam);
        if (dsbillno.Tables[0].Rows.Count > 0)
        {
            this.billno = dsbillno.Tables[0].Rows[0]["BillNo"].ToString();
        }
    }
Пример #8
0
    public void BindRegionData(DropDownList ddl)
    {
        SqlParameter[] param =
        {
            new SqlParameter("@Type", "SELECT_REGION_FILL")
        };
        DataSet ds = objSqlDataAccessLayer.ExecuteDataset(CommandType.StoredProcedure, "uspRPTDefectiveStock", param);

        ddl.DataSource     = ds;
        ddl.DataTextField  = "Region_Desc";
        ddl.DataValueField = "Region_SNo";
        ddl.DataBind();
        ddl.Items.Insert(0, new ListItem("All", "0"));
    }
Пример #9
0
    public void BindASCCode(DropDownList ddlASCCode)
    {
        DataSet      dsASCCode = new DataSet();
        SqlParameter sqlParam  = new SqlParameter("@Type", "SELECT_ASC_FILL");

        dsASCCode                 = objSql.ExecuteDataset(CommandType.StoredProcedure, "uspSpareStockTransferASC", sqlParam);
        ddlASCCode.DataSource     = dsASCCode;
        ddlASCCode.DataTextField  = "ASC_Name";
        ddlASCCode.DataValueField = "ASC_Id";
        ddlASCCode.DataBind();
        ddlASCCode.Items.Insert(0, new ListItem("Select", "Select"));
        dsASCCode = null;
        sqlParam  = null;
    }
    public void BindProductDivisionData(DropDownList ddl)
    {
        SqlParameter[] param =
        {
            new SqlParameter("@Type",   "SELECT_PRODUCT_DIVISION_FILL"),
            new SqlParameter("@ASC_Id", this.ASC_Id)
        };

        DataSet ds = objSqlDataAccessLayer.ExecuteDataset(CommandType.StoredProcedure, "uspRPTStockstatementofASC", param);

        ddl.DataSource     = ds;
        ddl.DataTextField  = "Product_Division_Name";
        ddl.DataValueField = "ProductDivision_Id";
        ddl.DataBind();
        ddl.Items.Insert(0, new ListItem("Select", "0"));
    }
Пример #11
0
    public static string GetAlternateSpare(int intProductDivisionId)
    {
        string strResult = string.Empty;
        Dictionary <string, string> lstdetails = new Dictionary <string, string>();

        try
        {
            DataSet        ds    = new DataSet();
            SqlParameter[] param =
            {
                new SqlParameter("@Type",           "BIND_ALL_SPARE_CODE"),
                new SqlParameter("@ProductLine_Id", intProductDivisionId)
            };
            SIMSSqlDataAccessLayer objsql = new SIMSSqlDataAccessLayer();
            ds = objsql.ExecuteDataset(CommandType.StoredProcedure, "uspSpareBOMMaster", param);
            if (ds != null)
            {
                if (ds.Tables.Count > 0)
                {
                    foreach (DataRow dtrow in ds.Tables[0].Rows)
                    {
                        lstdetails.Add(dtrow["Spare_Id"].ToString(), dtrow["SAP_Desc"].ToString());
                    }
                }
            }

            JavaScriptSerializer json = new JavaScriptSerializer();
            strResult = json.Serialize(lstdetails);
            return(strResult);
        }
        catch (Exception ex)
        {
            return(strResult);
        }
    }
Пример #12
0
    //#region Functions For Get Invoice Details
    public DataSet GetInvoiceDetails()
    {
        DataSet dsInvoice = new DataSet();

        SqlParameter[] sqlParamI =
        {
            new SqlParameter("@ProductDivisionSno", ProductDivisionId),
            new SqlParameter("@AscId",              AscId),
            new SqlParameter("@BranchId",           BranchId),
            new SqlParameter("@RegionId",           RegionId),
            new SqlParameter("@MonthId",            MonthId),
            new SqlParameter("@YearId",             YearId),
            new SqlParameter("@UserName",           UserName)
        };
        dsInvoice = objSql.ExecuteDataset(CommandType.StoredProcedure, "GenerateInvoice", sqlParamI);
        return(dsInvoice);
    }
Пример #13
0
    public void BindDDLDivision(DropDownList ddlDivision)
    {
        DataSet dsDivision = new DataSet();

        SqlParameter[] sqlParam =
        {
            new SqlParameter("@Type", "SELECT_ALL_UNITCODE_UNITSNO")
        };
        dsDivision                 = objSql.ExecuteDataset(CommandType.StoredProcedure, "uspStockMovementLog", sqlParam);
        ddlDivision.DataSource     = dsDivision;
        ddlDivision.DataTextField  = dsDivision.Tables[0].Columns[1].ToString();
        ddlDivision.DataValueField = dsDivision.Tables[0].Columns[0].ToString();
        ddlDivision.DataBind();
        ddlDivision.Items.Insert(0, new ListItem("ALL", "0"));
        dsDivision = null;
        sqlParam   = null;
    }
Пример #14
0
    public void BindASC()
    {
        DataSet dsASC = new DataSet();

        SqlParameter[] sqlParamS =
        {
            new SqlParameter("@ASC",  this.ASC),
            new SqlParameter("@Type", "GET_ASC_NAME")
        };
        dsASC = objsql.ExecuteDataset(CommandType.StoredProcedure, "uspDestructionOfDefectiveSparesASC", sqlParamS);
        if (dsASC.Tables[0].Rows.Count > 0)
        {
            this.ASC = dsASC.Tables[0].Rows[0]["sc_name"].ToString();
        }
        dsASC     = null;
        sqlParamS = null;
    }
Пример #15
0
    public void BindSpareBOMOnSpareBOMId(int intSpareBOMID, string strType)
    {
        DataSet ds = new DataSet();

        SqlParameter[] sqlParamG =
        {
            new SqlParameter("@Type",         strType),
            new SqlParameter("@Spare_BOM_Id", intSpareBOMID)
        };

        ds = objsql.ExecuteDataset(CommandType.StoredProcedure, "uspSpareBOMMaster", sqlParamG);
        if (ds.Tables[0].Rows.Count > 0)
        {
            Spare_BOM_Id       = Convert.ToInt32(ds.Tables[0].Rows[0]["Spare_BOM_Id"].ToString());
            ProductDivision_Id = Convert.ToInt32(ds.Tables[0].Rows[0]["ProductDivision_Id"].ToString());
            ProductLine_Id     = Convert.ToInt32(ds.Tables[0].Rows[0]["ProductLine_Id"].ToString());
            Product_Id         = Convert.ToInt32(ds.Tables[0].Rows[0]["Product_Id"].ToString());
            Spare_Id           = Convert.ToInt32(ds.Tables[0].Rows[0]["Spare_Id"].ToString());
            QtyPerUnit         = Convert.ToInt32(ds.Tables[0].Rows[0]["Spare_BOM_QtyPerUnit"].ToString());
            AltSpareCode1      = Convert.ToInt32(ds.Tables[0].Rows[0]["ALT_Spare_Code1"].ToString());
            AltSpareCode2      = Convert.ToInt32(ds.Tables[0].Rows[0]["ALT_Spare_Code2"].ToString());
            AltSpareCode3      = Convert.ToInt32(ds.Tables[0].Rows[0]["ALT_Spare_Code3"].ToString());
            AltSpareCode4      = Convert.ToInt32(ds.Tables[0].Rows[0]["ALT_Spare_Code4"].ToString());
            QtyPerUnitOfAlt1   = Convert.ToInt32(ds.Tables[0].Rows[0]["ALT_Spare_Code1_QtyPerUnit"].ToString());
            QtyPerUnitOfAlt2   = Convert.ToInt32(ds.Tables[0].Rows[0]["ALT_Spare_Code2_QtyPerUnit"].ToString());
            QtyPerUnitOfAlt3   = Convert.ToInt32(ds.Tables[0].Rows[0]["ALT_Spare_Code3_QtyperUnit"].ToString());
            QtyPerUnitOfAlt4   = Convert.ToInt32(ds.Tables[0].Rows[0]["ALT_Spare_Code4_QtyPerUnit"].ToString());
            ActiveFlag         = ds.Tables[0].Rows[0]["Active_Flag"].ToString();
        }
        ds = null;
    }
Пример #16
0
    public void BindProductLineOnSNo(int intProductLineSNo, string strType)
    {
        DataSet dsProductLine = new DataSet();

        SqlParameter[] sqlParamG =
        {
            new SqlParameter("@Type",                 strType),
            new SqlParameter("@ActivityParameterSNo", intProductLineSNo)
        };

        dsProductLine = objSql.ExecuteDataset(CommandType.StoredProcedure, "uspRateMaster", sqlParamG);
        if (dsProductLine.Tables[0].Rows.Count > 0)
        {
            ActivityParameterSNo = int.Parse(dsProductLine.Tables[0].Rows[0]["ActivityParameter_SNo"].ToString());
            UnitSno        = int.Parse(dsProductLine.Tables[0].Rows[0]["Unit_Sno"].ToString());
            ActivityCode   = int.Parse(dsProductLine.Tables[0].Rows[0]["ActivityCode"].ToString());
            ParameterCode1 = int.Parse(dsProductLine.Tables[0].Rows[0]["Parameter_Code1"].ToString());
            ParameterCode2 = int.Parse(dsProductLine.Tables[0].Rows[0]["Parameter_Code2"].ToString());
            ParameterCode3 = int.Parse(dsProductLine.Tables[0].Rows[0]["Parameter_Code3"].ToString());
            ParameterCode4 = int.Parse(dsProductLine.Tables[0].Rows[0]["Parameter_Code4"].ToString());
            PossibleValue1 = int.Parse(dsProductLine.Tables[0].Rows[0]["ParameterPossible_Id1"].ToString());
            PossibleValue2 = int.Parse(dsProductLine.Tables[0].Rows[0]["ParameterPossible_Id2"].ToString());
            PossibleValue3 = int.Parse(dsProductLine.Tables[0].Rows[0]["ParameterPossible_Id3"].ToString());
            PossibleValue4 = int.Parse(dsProductLine.Tables[0].Rows[0]["ParameterPossible_Id4"].ToString());
            UOM            = dsProductLine.Tables[0].Rows[0]["UOM"].ToString();
            Actual         = Convert.ToInt32(dsProductLine.Tables[0].Rows[0]["Actual"].ToString());
            Rate           = decimal.Parse(dsProductLine.Tables[0].Rows[0]["Rate"].ToString());
            SC_SNo         = Convert.ToInt32(dsProductLine.Tables[0].Rows[0]["SC_SNo"].ToString());
            SC_Name        = dsProductLine.Tables[0].Rows[0]["SC_Name"].ToString();
            ActiveFlag     = dsProductLine.Tables[0].Rows[0]["Active_Flag"].ToString();
        }
        dsProductLine = null;
    }
    public void BindProductDiv()
    {
        DataSet dsProductdiv = new DataSet();

        SqlParameter[] sqlParamS =
        {
            new SqlParameter("@ComplaintNo", this.ComplaintNo),
            new SqlParameter("@Type",        "GET_PRODUCT_DIV")
        };
        dsProductdiv = objsql.ExecuteDataset(CommandType.StoredProcedure, "uspSpareConsumptionAndActivityDetails", sqlParamS);
        if (dsProductdiv.Tables[0].Rows.Count > 0)
        {
            this.ProductDivision = dsProductdiv.Tables[0].Rows[0]["Unit_Desc"].ToString();
        }

        dsProductdiv = null;
        sqlParamS    = null;
    }
Пример #18
0
 // added 4 july bhawesh
 public void BindBranches(DropDownList ddlbranch)
 {
     DataSet ds = new DataSet();
     SqlParameter[] sqlParamG =
     {
         new SqlParameter("@Type","GetBranches")
     };
     ds = objSql.ExecuteDataset(CommandType.StoredProcedure, "uspVendorMaster", sqlParamG);
     if (ds.Tables[0].Rows.Count > 0)
     {
         ddlbranch.DataSource = ds;
         ddlbranch.DataTextField = "branch_name";
         ddlbranch.DataValueField = "branch_sno";
         ddlbranch.DataBind();
         ddlbranch.Items.Insert(0, "Select");
     }
     ds = null;
 }
Пример #19
0
    public void BindASC(DropDownList ddlasc)
    {
        DataSet dsASC = new DataSet();

        SqlParameter[] sqlParamS =
        {
            new SqlParameter("@CGuser", this.CGuser),
            new SqlParameter("@Type",   "GET_ASC_NAME")
        };
        dsASC = objsql.ExecuteDataset(CommandType.StoredProcedure, "uspClaimApprovalWarrantyComplaints", sqlParamS);
        ddlasc.DataValueField = "sc_sno";
        ddlasc.DataTextField  = "SC_Name";
        ddlasc.DataSource     = dsASC;
        ddlasc.DataBind();
        ddlasc.Items.Insert(0, new ListItem("Select", "0"));
        dsASC     = null;
        sqlParamS = null;
    }
Пример #20
0
    public void BindProductDivision(DropDownList ddlproductdivision)
    {
        DataSet dsProductDiv = new DataSet();

        SqlParameter[] sqlParamS =
        {
            new SqlParameter("@ASC",  this.Asc),
            new SqlParameter("@Type", "SELECT_PRODUCT_DIVISION")
        };
        //Getting values of Complaint to bind complaint drop downlist using SQL Data Access Layer
        dsProductDiv = objsql.ExecuteDataset(CommandType.StoredProcedure, "uspStockView", sqlParamS);
        ddlproductdivision.DataSource     = dsProductDiv;
        ddlproductdivision.DataTextField  = "Unit_Desc";
        ddlproductdivision.DataValueField = "Unit_Sno";
        ddlproductdivision.DataBind();
        ddlproductdivision.Items.Insert(0, new ListItem("Select", "0"));
        dsProductDiv = null;
        sqlParamS    = null;
    }
    public void BindASC(DropDownList ddlASC)
    {
        DataSet dsASC = new DataSet();

        SqlParameter[] sqlParamS =
        {
            //new SqlParameter("@ASC",this.ASC),
            new SqlParameter("@CGuser", this.CGuser),
            new SqlParameter("@Type",   "GET_ASC_NAME")
        };
        dsASC                 = objsql.ExecuteDataset(CommandType.StoredProcedure, "uspDefectiveSpareChallanConfirmation", sqlParamS);
        ddlASC.DataSource     = dsASC;
        ddlASC.DataTextField  = "sc_name";
        ddlASC.DataValueField = "SC_Sno";
        ddlASC.DataBind();
        ddlASC.Items.Insert(0, new ListItem("Select", "0"));
        dsASC     = null;
        sqlParamS = null;
    }
Пример #22
0
    protected void btnSearch_Click(object sender, EventArgs e)
    {
        sqlParamSrh[0].Value = TxtIBN.Text.Trim();

        DataSet ds = objSqlDataAccessLayer.ExecuteDataset(CommandType.StoredProcedure, "SearchDetailByIBN", sqlParamSrh);

        lblCount.Text    = ds.Tables[0].Rows.Count.ToString();
        gvMIS.DataSource = ds;
        gvMIS.DataBind();
    }
Пример #23
0
    public DataSet BindData(GridView grv)
    {
        SqlParameter[] sqlParamSrh =
        {
            //new SqlParameter("@MessageOut",SqlDbType.VarChar,200),
            //new SqlParameter("@Type","SELECT"),
            //new SqlParameter("@Region_Sno",this.Region_Sno),
            //new SqlParameter("@Branch_Sno",this.Branch_SNo),
            //new SqlParameter("@ProductDivision_Id",this.ProductDivision_Id),
            //new SqlParameter("@ASC_Id",this.ASC_Id)
            new SqlParameter("@Region_Sno",         this.Region_Sno),
            new SqlParameter("@Branch_Sno",         this.Branch_SNo),
            new SqlParameter("@ASC_Id",             this.ASC_Id),
            new SqlParameter("@ProductDivision_Id", this.ProductDivision_Id),
            new SqlParameter("@Type",               "SELECT"),
            new SqlParameter("@ddlDefectCategory",  this.Defect_Category_SNo),
            new SqlParameter("@ddlDefectCode",      this.Defect_Code),
            new SqlParameter("@ProductLine_Sno",    this.ProductLine_Sno),
            new SqlParameter("@FromDate",           this.Fromdate),
            new SqlParameter("@ToDate",             this.ToDate),
            new SqlParameter("@MessageOut",         SqlDbType.VarChar, 200)
        };
        sqlParamSrh[10].Direction = ParameterDirection.Output;

        // 10 apr 12 , merge with type : SELECT_NW (complaint cancelled at Init. )  //
        DataSet ds = objSqlDataAccessLayer.ExecuteDataset(CommandType.StoredProcedure, "uspRPTPendingClaimApproval_New", sqlParamSrh);

        sqlParamSrh[4].Value = "SELECT_NW";

        dstData = objSqlDataAccessLayer.ExecuteDataset(CommandType.StoredProcedure, "uspRPTPendingClaimApproval_New", sqlParamSrh);

        dstData.Merge(ds);
        if (dstData.Tables[0].Rows.Count > 0)
        {
            dstData.Tables[0].Columns.Add("Total");
            dstData.Tables[0].Columns.Add("Sno");
            int intCnt, intCommon = 1;
            int intCommonCnt = dstData.Tables[0].Rows.Count;
            for (intCnt = 0; intCnt < intCommonCnt; intCnt++)
            {
                dstData.Tables[0].Rows[intCnt]["Sno"]   = intCommon;
                dstData.Tables[0].Rows[intCnt]["Total"] = intCommonCnt;
                intCommon++;
            }
        }
        grv.DataSource = dstData;
        grv.DataBind();

        // dstData = objCommonClass.BindDataGrid(grv, "uspRPTPendingClaimApproval_New", true, sqlParamSrh, true);
        return(dstData);
    }
 public DataSet BindGridSalesOrder(GridView gvComm, Label lblRowCount)
 {
     SqlParameter[] sqlParamSrh =
     {
         new SqlParameter("@MessageOut",   SqlDbType.VarChar, 1000),
         new SqlParameter("@Return_Value", SqlDbType.Int),
         new SqlParameter("@Active_Flag",  "1"),              //FOR SOFT DELETE OR FILTERING
         new SqlParameter("@Type",         this.ActionType),
     };
     sqlParamSrh[0].Direction = ParameterDirection.Output;
     sqlParamSrh[1].Direction = ParameterDirection.ReturnValue;
     dsCommon    = objSql.ExecuteDataset(CommandType.StoredProcedure, "uspDestructionDefectiveSpares", sqlParamSrh);
     ReturnValue = Convert.ToInt32(sqlParamSrh[1].Value.ToString());
     MessageOut  = sqlParamSrh[0].Value.ToString();
     if (ReturnValue != -1)
     {
         lblRowCount.Text = dsCommon.Tables[0].Rows.Count.ToString();
         objCommonClass.SortGridData(gvComm, dsCommon, this.SortColumnName, this.SortOrderBy);
     }
     return(dsCommon);
 }
Пример #25
0
    public void BindActivityParameter(int intId, string strType)
    {
        DataSet ds = new DataSet();

        SqlParameter[] sqlParamG =
        {
            new SqlParameter("@Type",                        strType),
            new SqlParameter("@ActivityParameterMapping_Id", intId)
        };

        ds = objSql.ExecuteDataset(CommandType.StoredProcedure, "uspActivityParameterMapping", sqlParamG);
        if (ds.Tables[0].Rows.Count > 0)
        {
            ActivityParameterMapping_Id = int.Parse(ds.Tables[0].Rows[0]["ActivityParameterMapping_Id"].ToString());
            ProductDivision_Id          = int.Parse(ds.Tables[0].Rows[0]["ProductDivision_Id"].ToString());
            Activity_Id  = Convert.ToInt32(ds.Tables[0].Rows[0]["Activity_Id"].ToString());
            Parameter_Id = Convert.ToInt32(ds.Tables[0].Rows[0]["Parameter_Id"].ToString());
            Active_Flag  = ds.Tables[0].Rows[0]["Active_Flag"].ToString();
        }
        ds = null;
    }
Пример #26
0
    public void GetSapareMappingDetails(int intSpareMappingId, string strType)
    {
        DataSet ds = new DataSet();

        SqlParameter[] sqlParamG =
        {
            new SqlParameter("@Type",            strType),
            new SqlParameter("@SpareMapping_Id", intSpareMappingId)
        };

        ds = objSql.ExecuteDataset(CommandType.StoredProcedure, "uspVendorSpareMapping", sqlParamG);
        if (ds.Tables[0].Rows.Count > 0)
        {
            SpareMapping_Id    = Convert.ToInt32(ds.Tables[0].Rows[0]["SpareMapping_Id"].ToString());
            Vendor_Id          = Convert.ToInt32(ds.Tables[0].Rows[0]["Vendor_Id"].ToString());
            ProductDivision_Id = Convert.ToInt32(ds.Tables[0].Rows[0]["ProductDivision_Id"].ToString());
            Spare_BOM_Id       = Convert.ToInt32(ds.Tables[0].Rows[0]["Spare_BOM_Id"].ToString());
            ActiveFlag         = ds.Tables[0].Rows[0]["Active_Flag"].ToString();
        }
        ds = null;
    }
Пример #27
0
    public void BindParameterPossibleValue(int intId, string strType)
    {
        DataSet ds = new DataSet();

        SqlParameter[] sqlParamG =
        {
            new SqlParameter("@Type",                 strType),
            new SqlParameter("@ParameterPossible_Id", intId)
        };

        ds = objSqlDAL.ExecuteDataset(CommandType.StoredProcedure, "uspParameterPossibleValue", sqlParamG);
        if (ds.Tables[0].Rows.Count > 0)
        {
            ParameterPossible_Id = Convert.ToInt32(ds.Tables[0].Rows[0]["ParameterPossible_Id"].ToString());
            ProductDivision_Id   = Convert.ToInt32(ds.Tables[0].Rows[0]["ProductDivision_Id"].ToString());
            Parameter_Id         = Convert.ToInt32(ds.Tables[0].Rows[0]["Parameter_Id"].ToString());
            Possibl_Value        = ds.Tables[0].Rows[0]["Possibl_Value"].ToString();
            Active_Flag          = ds.Tables[0].Rows[0]["Active_Flag"].ToString();
        }
        ds = null;
    }
Пример #28
0
    public void BindProductOnSNo(int intProductSNo, string strType)
    {
        try
        {
            DataSet        dsProduct = new DataSet();
            SqlParameter[] sqlParamG =
            {
                new SqlParameter("@Type",        strType),
                new SqlParameter("@Product_SNo", intProductSNo)
            };

            dsProduct = objSql.ExecuteDataset(CommandType.StoredProcedure, "uspFGIntermediate", sqlParamG);
            if (dsProduct.Tables[0].Rows.Count > 0)
            {
                ProductSNo  = int.Parse(dsProduct.Tables[0].Rows[0]["Intermediate_FG_Id"].ToString());
                ProductCode = dsProduct.Tables[0].Rows[0]["Product_Code"].ToString();
                //ProductDescFGIntmd = dsProduct.Tables[0].Rows[0]["Product_Desc"].ToString();
                //ProductMappingFlag = dsProduct.Tables[0].Rows[0]["Product_Mapped"].ToString();
            }
            dsProduct = null;
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }
Пример #29
0
 public DataSet BindData(GridView grv)
 {
     SqlParameter[] sqlParamSrh =
     {
         new SqlParameter("@MessageOut",         SqlDbType.VarChar,        200),
         new SqlParameter("@Type",               "SELECT"),
         new SqlParameter("@Region_Sno",         this.Region_Sno),
         new SqlParameter("@Branch_Sno",         this.Branch_SNo),
         new SqlParameter("@ProductDivision_Id", this.ProductDivision_Id),
         new SqlParameter("@Spare_Id",           this.Spare_Id),
         new SqlParameter("@From_Date",          this.From_Date),
         new SqlParameter("@To_Date",            this.To_Date),
         new SqlParameter("@ASC_Id",             this.ASC_Id)
     };
     sqlParamSrh[0].Direction = ParameterDirection.Output;
     dstData = objSqlDataAccessLayer.ExecuteDataset(CommandType.StoredProcedure, "uspRPTSpareConsumptionSummary", sqlParamSrh);
     if (dstData.Tables[0].Rows.Count > 0)
     {
         int intCommon = 1;
         for (int intCnt = 0; intCnt < dstData.Tables[0].Rows.Count; intCnt++)
         {
             dstData.Tables[0].Rows[intCnt][0] = intCommon;
             intCommon++;
         }
     }
     grv.DataSource = dstData;
     grv.DataBind();
     return(dstData);
 }
Пример #30
0
    /// <summary>
    /// Return Dataset for binding grid
    /// </summary>
    /// <returns></returns>
    public DataSet GetGridData()
    {
        DataSet ds = new DataSet();

        TotalPage = 0;
        SqlParameter[] sqlParamI =
        {
            new SqlParameter("@UserName",           this.EmpCode),
            new SqlParameter("@ActiveStatus",       this.ActiveStatus),
            new SqlParameter("@RegionSno",          this.RegionSno),
            new SqlParameter("@ProductDivisionId",  this.ProductDivisionSno),
            new SqlParameter("@BranchSno",          this.BranchSno),
            new SqlParameter("@AscId",              this.AscId),
            new SqlParameter("@CunstumptionStatus", this.ConsumptionStatus),
            new SqlParameter("@StickerCode",        this.StickerCode),
            new SqlParameter("@Type",               this.Type),
            new SqlParameter("@AllocationStatus",   this.AllocationStatus),
            new SqlParameter("@SortingOrder",       this.SortingOrder),
            new SqlParameter("@PageIndex",          this.PageIndex),
            new SqlParameter("@Role",               this.Role),
            new SqlParameter("@PageSize",           this.PageSize),
            new SqlParameter("@AllocationType",     this.AllocationType)
        };
        ds = objSqlDataAccessLayer.ExecuteDataset(CommandType.StoredProcedure, "uspGetStickerDetails", sqlParamI);
        if (this.Type.Equals("SELECT", StringComparison.InvariantCultureIgnoreCase))
        {
            if (ds != null)
            {
                if (ds.Tables.Count > 0)
                {
                    if (ds.Tables[0].Rows.Count > 0)
                    {
                        TotalPage = Convert.ToInt32(ds.Tables[0].Rows[0]["TotalCount"]);
                    }
                }
            }
        }
        sqlParamI = null;
        return(ds);
    }