コード例 #1
0
    public string InsertPartDelivery()
    {
        SqlParameter[] sqlParamI =
        {
            new SqlParameter("@MessageOut",             SqlDbType.VarChar,            200),
            new SqlParameter("@Return_Value",           SqlDbType.Int),
            new SqlParameter("@Type",                   "INSERT_PART_DELIVERY_DATE"),
            new SqlParameter("@EmpCode",                this.EmpCode),
            new SqlParameter("@Ordered_Transaction_No", this.Ordered_Transaction_No),
            new SqlParameter("@Spare_Id",               this.Spare_Id),
            new SqlParameter("@Part_Delivery_Date",     this.Part_Delivery_Date),
            new SqlParameter("@Quantity",               this.Quantity)
        };

        sqlParamI[0].Direction = ParameterDirection.Output;
        sqlParamI[1].Direction = ParameterDirection.ReturnValue;
        objSql.ExecuteNonQuery(CommandType.StoredProcedure, "uspDeliverySchedule", sqlParamI);
        if (int.Parse(sqlParamI[1].Value.ToString()) == -1)
        {
            this.ReturnValue = int.Parse(sqlParamI[1].Value.ToString());
        }
        strMsg    = sqlParamI[0].Value.ToString();
        sqlParamI = null;
        return(strMsg);
    }
コード例 #2
0
    public string SaveProposedQty(string strType)
    {
        SqlParameter[] sqlParamI =
        {
            new SqlParameter("@MessageOut",               SqlDbType.VarChar,        200),
            new SqlParameter("@Return_Value",             SqlDbType.Int),
            new SqlParameter("@Generated_Transaction_No", SqlDbType.VarChar,        200),
            new SqlParameter("@Type",                     strType),
            new SqlParameter("@EmpCode",                  this.EmpCode),
            new SqlParameter("@ASC_Id",                   this.ASC_Id),
            new SqlParameter("@ProductDivision_Id",       this.ProductDivision_Id),
            new SqlParameter("@Spare_Id",                 this.Spare_Id),
            new SqlParameter("@Current_Stock",            this.Current_Stock),
            new SqlParameter("@Proposed_Qty",             this.Proposed_Qty),
            new SqlParameter("@Rate",                     this.Rate),
            new SqlParameter("@Discount",                 this.Discount),
            new SqlParameter("@Value",                    this.Value),
            new SqlParameter("@Complaint_RefNo",          this.Complaint_RefNo),
            new SqlParameter("@Complaint_No",             this.Complaint_no),
            new SqlParameter("@SplitComplaint_RefNo",     this.Complaint_SplitNo)
        };

        sqlParamI[0].Direction = ParameterDirection.Output;
        sqlParamI[1].Direction = ParameterDirection.ReturnValue;
        sqlParamI[2].Direction = ParameterDirection.Output;
        objSql.ExecuteNonQuery(CommandType.StoredProcedure, "uspSpareRequirementIndent", sqlParamI);
        if (int.Parse(sqlParamI[1].Value.ToString()) == -1)
        {
            this.ReturnValue = int.Parse(sqlParamI[1].Value.ToString());
        }
        strMsg = sqlParamI[0].Value.ToString();
        Generated_Transaction_No = sqlParamI[2].Value.ToString();
        sqlParamI = null;
        return(strMsg);
    }
コード例 #3
0
 public string SaveData(string strType)
 {
     SqlParameter[] sqlParamI =
     {
         new SqlParameter("@MessageOut",         SqlDbType.VarChar,        200),
         new SqlParameter("@Return_Value",       SqlDbType.Int),
         new SqlParameter("@Type",               strType),
         new SqlParameter("@Spare_BOM_Id",       this.Spare_BOM_Id),
         new SqlParameter("@ProductDivision_Id", this.ProductDivision_Id),
         new SqlParameter("@ProductLine_Id",     this.ProductLine_Id),
         new SqlParameter("@Product_Id",         this.Product_Id),
         new SqlParameter("@Spare_Id",           this.Spare_Id),
         new SqlParameter("@QtyPerUnit",         this.QtyPerUnit),
         new SqlParameter("@AltSpareCode1",      this.AltSpareCode1),
         new SqlParameter("@AltSpareCode2",      this.AltSpareCode2),
         new SqlParameter("@AltSpareCode3",      this.AltSpareCode3),
         new SqlParameter("@AltSpareCode4",      this.AltSpareCode4),
         new SqlParameter("@QtyPerUnitOfAlt1",   this.QtyPerUnitOfAlt1),
         new SqlParameter("@QtyPerUnitOfAlt2",   this.QtyPerUnitOfAlt2),
         new SqlParameter("@QtyPerUnitOfAlt3",   this.QtyPerUnitOfAlt3),
         new SqlParameter("@QtyPerUnitOfAlt4",   this.QtyPerUnitOfAlt4),
         new SqlParameter("@EmpCode",            this.EmpCode),
         new SqlParameter("@Active_Flag",        int.Parse(this.ActiveFlag))
     };
     sqlParamI[0].Direction = ParameterDirection.Output;
     sqlParamI[1].Direction = ParameterDirection.ReturnValue;
     objsql.ExecuteNonQuery(CommandType.StoredProcedure, "uspSpareBOMMaster", sqlParamI);
     if (int.Parse(sqlParamI[1].Value.ToString()) == -1)
     {
         this.ReturnValue = int.Parse(sqlParamI[1].Value.ToString());
     }
     strMsg    = sqlParamI[0].Value.ToString();
     sqlParamI = null;
     return(strMsg);
 }
コード例 #4
0
 public string SaveData(string strType)
 {
     SqlParameter[] sqlParamI =
     {
         new SqlParameter("@MessageOut",      SqlDbType.VarChar,         200),
         new SqlParameter("@Return_Value",    SqlDbType.Int),
         new SqlParameter("@Type",            strType),
         new SqlParameter("@Document_No",     this.AutoGeneratedNumber),
         new SqlParameter("@Asc_Code",        this.ASC_Id),
         new SqlParameter("@ProductDivision", this.ProductDivision_Id),
         // new SqlParameter("@Vendor_Id",this.VendorId),
         new SqlParameter("@Vendor",          this.Vendor),
         new SqlParameter("@SpareId",         this.SpareId),
         new SqlParameter("@Quantity",        this.Quantity),
         new SqlParameter("@RateSAP",         this.RateSAP),
         new SqlParameter("@RatePurchased",   this.RatePurchased),
         new SqlParameter("@Amount",          this.Amount),
         new SqlParameter("@Bill_No",         this.BillNo),
         new SqlParameter("@Bill_Date",       this.BillDate),
         new SqlParameter("@Comments",        this.Comments),
         new SqlParameter("@EmpCode",         Membership.GetUser().UserName.ToString())
     };
     sqlParamI[0].Direction = ParameterDirection.Output;
     sqlParamI[1].Direction = ParameterDirection.ReturnValue;
     objSql.ExecuteNonQuery(CommandType.StoredProcedure, "uspSparePurchaseOutside", sqlParamI);
     if (int.Parse(sqlParamI[1].Value.ToString()) == -1)
     {
         this.ReturnValue = int.Parse(sqlParamI[1].Value.ToString());
     }
     strMsg    = sqlParamI[0].Value.ToString();
     sqlParamI = null;
     return(strMsg);
 }
コード例 #5
0
 public string SaveData(string strType)
 {
     try
     {
         SqlParameter[] sqlParamI =
         {
             new SqlParameter("@MessageOut",       SqlDbType.VarChar,      200),
             new SqlParameter("@Return_Value",     SqlDbType.Int),
             new SqlParameter("@Type",             strType),
             new SqlParameter("@EmpCode",          this.EmpCode),
             new SqlParameter("@Product_Code",     this.ProductCode),
             new SqlParameter("@Product_Desc",     this.ProductDesc),
             new SqlParameter("@Unit_Sno",         this.Unit_Sno),
             new SqlParameter("@ProductLine_SNo",  this.ProductLine_SNo),
             new SqlParameter("@Rating_Status",    "C"),                   //this.Rating_Status),
             new SqlParameter("@ProductGroup_SNo", this.ProductGroup_SNo),
             new SqlParameter("@Active_Flag",                          1), //int.Parse(this.ActiveFlag)),
             new SqlParameter("@Product_SNo",      this.ProductSNo)
         };
         sqlParamI[0].Direction = ParameterDirection.Output;
         sqlParamI[1].Direction = ParameterDirection.ReturnValue;
         objSql.ExecuteNonQuery(CommandType.StoredProcedure, "uspFGIntermediate", sqlParamI);
         if (int.Parse(sqlParamI[1].Value.ToString()) == -1)
         {
             this.ReturnValue = int.Parse(sqlParamI[1].Value.ToString());
         }
         strMsg    = sqlParamI[0].Value.ToString();
         sqlParamI = null;
         return(strMsg);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #6
0
 public string AllocateStickers()
 {
     SqlParameter[] sqlParamI =
     {
         new SqlParameter("@Message",   SqlDbType.VarChar, 1000),
         new SqlParameter("@XmlData",   SqlDbType.Xml),
         new SqlParameter("@BranchSno", this.BranchSno),
         new SqlParameter("RegionSno",  this.RegionSno),
         new SqlParameter("@Type",      "ALLOCATESTICKER")
     };
     sqlParamI[0].Direction = ParameterDirection.Output;
     sqlParamI[1].Value     = this.xmlAtribute;
     objSqlDataAccessLayer.ExecuteNonQuery(CommandType.StoredProcedure, "uspGetStickerDetails", sqlParamI);
     return(sqlParamI[0].Value.ToString());
 }
コード例 #7
0
    public void BindAscName()
    {
        SqlParameter[] sqlParamI =
        {
            new SqlParameter("@ASCName", SqlDbType.VarChar, 200),
            new SqlParameter("@ASC",     this.ASC),
            new SqlParameter("@Type",    "GET_ASC_NAME")
        };
        sqlParamI[0].Direction = ParameterDirection.Output;

        objsql.ExecuteNonQuery(CommandType.StoredProcedure, "uspChallanPrintScreen", sqlParamI);

        ASCName   = sqlParamI[0].Value.ToString();
        sqlParamI = null;
    }
コード例 #8
0
    public string SaveData(string strType)
    {
        SqlParameter[] sqlParamI =
        {
            new SqlParameter("@MessageOut",         SqlDbType.VarChar,        200),
            new SqlParameter("@Return_Value",       SqlDbType.Int),
            new SqlParameter("@Type",               strType),
            new SqlParameter("@EmpCode",            this.EmpCode),
            new SqlParameter("@ASC_Id",             this.ASC_Id),
            new SqlParameter("@ProductDivision_Id", this.ProductDivision_Id),
            new SqlParameter("@Spare_Id",           this.Spare_Id),
            new SqlParameter("@From_Loc_Id",        this.From_Loc_Id),
            new SqlParameter("@To_Loc_Id",          this.To_Loc_Id),
            new SqlParameter("@Transfered_Qty",     this.Transfered_Qty)
        };

        sqlParamI[0].Direction = ParameterDirection.Output;
        sqlParamI[1].Direction = ParameterDirection.ReturnValue;
        objSql.ExecuteNonQuery(CommandType.StoredProcedure, "uspSpareStockTransferASC", sqlParamI);
        if (int.Parse(sqlParamI[1].Value.ToString()) == -1)
        {
            this.ReturnValue = int.Parse(sqlParamI[1].Value.ToString());
        }
        strMsg    = sqlParamI[0].Value.ToString();
        sqlParamI = null;
        return(strMsg);
    }
コード例 #9
0
    public string SaveData(double strRate, int intActivityParameter_SNo, int intProductDivision_Id, int intServiceContractor_Id)
    {
        string strMsg = "";

        try
        {
            DataSet        ds        = new DataSet();
            SqlParameter[] sqlParamI =
            {
                new SqlParameter("@MessageOut",            SqlDbType.VarChar,          200),
                new SqlParameter("@Return_Value",          SqlDbType.Int),
                new SqlParameter("@Type",                  "INSERT_RATE_MASTER_DATA"),
                new SqlParameter("@Rate",                  strRate),
                new SqlParameter("@Actual",                this.Actual),
                new SqlParameter("@ActivityParameter_SNo", intActivityParameter_SNo),
                new SqlParameter("@ProductDivision_Id",    intProductDivision_Id),
                new SqlParameter("@ServiceContractor_Id",  intServiceContractor_Id),
            };
            sqlParamI[0].Direction = ParameterDirection.Output;
            sqlParamI[1].Direction = ParameterDirection.ReturnValue;
            objSql.ExecuteNonQuery(CommandType.StoredProcedure, "uspRateMasterForASC", sqlParamI);
            if (int.Parse(sqlParamI[1].Value.ToString()) == -1)
            {
                this.ReturnValue = int.Parse(sqlParamI[1].Value.ToString());
            }
            strMsg    = sqlParamI[0].Value.ToString();
            sqlParamI = null;
        }
        catch (Exception ex)
        {
            strMsg = "Records not Saved!";
        }
        return(strMsg);
    }
コード例 #10
0
 public string SaveData(string strType)
 {
     SqlParameter[] sqlParamI =
     {
         new SqlParameter("@MessageOut",             SqlDbType.VarChar,           200),
         new SqlParameter("@Return_Value",           SqlDbType.Int),
         new SqlParameter("@Type",                   strType),
         new SqlParameter("@Stock_Status_Code",      this.StockStatusLookUpCode),
         new SqlParameter("@Stock_Status_Desc",      this.StockStatusLookUpDesc),
         new SqlParameter("@EmpCode",                this.EmpCode),
         new SqlParameter("@Stock_SNo",              this.intStockStatusSno),
         new SqlParameter("@Active_Flag",            int.Parse(this.ActiveFlag)),
         new SqlParameter("@Stock_Status_lookUp_Id", this.intStockStatusSno)
     };
     sqlParamI[0].Direction = ParameterDirection.Output;
     sqlParamI[1].Direction = ParameterDirection.ReturnValue;
     objSIMSSql.ExecuteNonQuery(CommandType.StoredProcedure, "uspStockStatusLookUp", sqlParamI);
     if (int.Parse(sqlParamI[1].Value.ToString()) == -1)
     {
         this.ReturnValue = int.Parse(sqlParamI[1].Value.ToString());
     }
     strMsg    = sqlParamI[0].Value.ToString();
     sqlParamI = null;
     return(strMsg);
 }
コード例 #11
0
 public void SaveStockUpdateMaster()
 {
     SqlParameter[] sqlParamI =
     {
         new SqlParameter("@MessageOut",   SqlDbType.VarChar,     1000),
         new SqlParameter("@Return_Value", SqlDbType.Int),
         new SqlParameter("@StorageLocId", this.StorageLocId),
         new SqlParameter("@ASCCode",      this.ASCCode),
         new SqlParameter("@Division",     this.Division),
         new SqlParameter("@SpareCode",    this.SpareCode),
         //new SqlParameter("@SAP_Sales_Order",this.SAP_Sales_Order),
         //new SqlParameter("@SIMS_Indent_No",this.SIMS_Indent_No),
         new SqlParameter("@LocId",        this.LocId),
         new SqlParameter("@Qty",          this.Qty),
         new SqlParameter("@CGInvoice",    this.CGInvoice),
         new SqlParameter("@CreatedBy",    this.ActionBy),
         new SqlParameter("@Active_Flag",  Convert.ToInt32("1")),
         new SqlParameter("@Type",         this.ActionType)
     };
     sqlParamI[0].Direction = ParameterDirection.Output;
     sqlParamI[1].Direction = ParameterDirection.ReturnValue;
     objSqlDAL.ExecuteNonQuery(CommandType.StoredProcedure, "uspStockUpdateMaster", sqlParamI);
     this.ReturnValue = Convert.ToInt32(sqlParamI[1].Value.ToString());
     this.MessageOut  = sqlParamI[0].Value.ToString();
     sqlParamI        = null;
 }
コード例 #12
0
 public string SaveData(string strType)
 {
     SqlParameter[] sqlParamI =
     {
         new SqlParameter("@MessageOut",    SqlDbType.VarChar,           200),
         new SqlParameter("@Return_Value",  SqlDbType.Int),
         new SqlParameter("@Type",          strType),
         new SqlParameter("@EmpCode",       this.EmpCode),
         new SqlParameter("@ASC_Id",        this.ASC_Id),
         new SqlParameter("@Loc_Code",      this.Loc_Code),
         new SqlParameter("@Loc_Name",      this.Loc_Name),
         new SqlParameter("@Engineer_Code", this.Engineer_Code),
         new SqlParameter("@Active_Flag",   int.Parse(this.ActiveFlag)),
         //new SqlParameter("@IsDefault_Loc",this.IsDefault_Loc),
         new SqlParameter("@Loc_Id",        this.Loc_Id)
     };
     if (this.Engineer_Code.Trim().ToLower() == "select")
     {
         sqlParamI[7].Value = DBNull.Value;
     }
     sqlParamI[0].Direction = ParameterDirection.Output;
     sqlParamI[1].Direction = ParameterDirection.ReturnValue;
     objSql.ExecuteNonQuery(CommandType.StoredProcedure, "uspASCLocationMaster", sqlParamI);
     if (int.Parse(sqlParamI[1].Value.ToString()) == -1)
     {
         this.ReturnValue = int.Parse(sqlParamI[1].Value.ToString());
     }
     strMsg    = sqlParamI[0].Value.ToString();
     sqlParamI = null;
     return(strMsg);
 }
コード例 #13
0
 public string SaveData(string strType)
 {
     SqlParameter[] sqlParamI =
     {
         new SqlParameter("@MessageOut",        SqlDbType.VarChar,                 200),
         new SqlParameter("@Return_Value",      SqlDbType.Int),
         new SqlParameter("@Type",              strType),
         new SqlParameter("@EmpCode",           this.EmpCode),
         new SqlParameter("@SpareConsume_Id",   this.SpareConsume_Id),
         new SqlParameter("@SpareConsume_Code", this.SpareConsume_Code),
         new SqlParameter("@SpareConsume_Desc", this.SpareConsume_Desc),
         new SqlParameter("@Action_Type",       this.Action_Type),
         new SqlParameter("@Active_Flag",       Convert.ToInt32(this.ActiveFlag)),
     };
     sqlParamI[0].Direction = ParameterDirection.Output;
     sqlParamI[1].Direction = ParameterDirection.ReturnValue;
     objSql.ExecuteNonQuery(CommandType.StoredProcedure, "uspSpareConsume", sqlParamI);
     if (int.Parse(sqlParamI[1].Value.ToString()) == -1)
     {
         this.ReturnValue = int.Parse(sqlParamI[1].Value.ToString());
     }
     strMsg    = sqlParamI[0].Value.ToString();
     sqlParamI = null;
     return(strMsg);
 }
コード例 #14
0
    public string SaveData(string strType)
    {
        SqlParameter[] sqlParamI =
        {
            new SqlParameter("@MessageOut",             SqlDbType.VarChar,            200),
            new SqlParameter("@Return_Value",           SqlDbType.Int),
            new SqlParameter("@Type",                   strType),
            new SqlParameter("@EmpCode",                this.EmpCode),
            new SqlParameter("@ASC_Id",                 this.ASC_Id),
            new SqlParameter("@Loc_Id",                 this.Loc_Id),
            new SqlParameter("@ProductDivision_Id",     this.ProductDivision_Id),
            new SqlParameter("@Spare_Id",               this.Spare_Id),
            new SqlParameter("@Lead_Time",              this.Lead_Time),
            new SqlParameter("@AVGConsumption_Per_Day", this.AVGConsumption_Per_Day),
            new SqlParameter("@Safety_Percentage",      this.Safety_Percentage),
            new SqlParameter("@Reorder_Trigger",        this.Reorder_Trigger),
            new SqlParameter("@Recommended_Stock",      this.Recommended_Stock),
            new SqlParameter("@Order_Quantity",         this.Order_Quantity),
            new SqlParameter("@Min_Order_Quantity",     this.Min_Order_Quantity),
            new SqlParameter("@Active_Flag",            int.Parse(this.ActiveFlag)),
            new SqlParameter("@ASC_Spec_Spare_Id",      this.ASC_Spec_Spare_Id)
        };

        sqlParamI[0].Direction = ParameterDirection.Output;
        sqlParamI[1].Direction = ParameterDirection.ReturnValue;
        objSql.ExecuteNonQuery(CommandType.StoredProcedure, "uspASCSpecificSpareMaster", sqlParamI);
        if (int.Parse(sqlParamI[1].Value.ToString()) == -1)
        {
            this.ReturnValue = int.Parse(sqlParamI[1].Value.ToString());
        }
        strMsg    = sqlParamI[0].Value.ToString();
        sqlParamI = null;
        return(strMsg);
    }
コード例 #15
0
 public string SaveData(string strType)
 {
     SqlParameter[] sqlParamI =
     {
         new SqlParameter("@MessageOut",       SqlDbType.VarChar,         200),
         new SqlParameter("@Return_Value",     SqlDbType.Int),
         new SqlParameter("@Type",             strType),
         new SqlParameter("@Transaction_No",   this.AutoGeneratedNumber),
         new SqlParameter("@Asc_Code",         this.Asc_Code),
         new SqlParameter("@ProductDivision",  this.ProductDivision_Id),
         new SqlParameter("@Mov_Type_Id",      this.Mov_Type_Id),
         new SqlParameter("@Mov_Type_Text",    this.Mov_Type_Text),
         new SqlParameter("@Vendor_Id",        this.VendorId),
         new SqlParameter("@SpareId",          this.SpareId),
         new SqlParameter("@Loc_Id",           this.Loc_Id),
         new SqlParameter("@Def_Loc_Id",       this.Def_Loc_Id),
         new SqlParameter("@Current_Stock",    this.CurrentStock),
         new SqlParameter("@Quantity",         this.Quantity),
         new SqlParameter("@QtyAsPerLocation", this.StockAsPerLocation),
         new SqlParameter("@Action_Type_Id",   this.Action_Type_Id),
         new SqlParameter("@Comments",         this.Comments),
         new SqlParameter("@EmpCode",          Membership.GetUser().UserName.ToString())
     };
     sqlParamI[0].Direction = ParameterDirection.Output;
     sqlParamI[1].Direction = ParameterDirection.ReturnValue;
     objSql.ExecuteNonQuery(CommandType.StoredProcedure, "uspSpareSalePurchaseByASC", sqlParamI);
     if (int.Parse(sqlParamI[1].Value.ToString()) == -1)
     {
         this.ReturnValue = int.Parse(sqlParamI[1].Value.ToString());
     }
     strMsg    = sqlParamI[0].Value.ToString();
     sqlParamI = null;
     return(strMsg);
 }
コード例 #16
0
    public string SaveData(string strType)
    {
        SqlParameter[] sqlParamI =
        {
            new SqlParameter("@MessageOut",SqlDbType.VarChar,200),
            new SqlParameter("@Return_Value",SqlDbType.Int),
            new SqlParameter("@Type",strType),
            new SqlParameter("@EmpCode",this.EmpCode),
            new SqlParameter("@Vendor_Id",this.Vendor_Id),
            new SqlParameter("@Vendor_Code",this.Vendor_Code),
            new SqlParameter("@Vendor_Name",this.Vendor_Name),
            new SqlParameter("@Branch_Sno",this.Branch_ID),
            new SqlParameter("@Address",this.Address),
            new SqlParameter("@Active_Flag",Convert.ToInt32(this.ActiveFlag)),

        };
        sqlParamI[0].Direction = ParameterDirection.Output;
        sqlParamI[1].Direction = ParameterDirection.ReturnValue;
        objSql.ExecuteNonQuery(CommandType.StoredProcedure, "uspVendorMaster", sqlParamI);
        if (int.Parse(sqlParamI[1].Value.ToString()) == -1)
        {
            this.ReturnValue = int.Parse(sqlParamI[1].Value.ToString());
        }
        strMsg = sqlParamI[0].Value.ToString();
        sqlParamI = null;
        return strMsg;
    }
コード例 #17
0
    public void SaveData()
    {
        SqlParameter[] sqlParamI =
        {
            new SqlParameter("@MessageOut",          SqlDbType.VarChar,         200),
            new SqlParameter("@Return_Value",        SqlDbType.Int),
            new SqlParameter("@Type",                this.ActionType),
            new SqlParameter("@CreatedBy",           this.ActionBy),
            new SqlParameter("@Active_Flag",                                1),
            new SqlParameter("@ASC_Code",            this.ASC_Code),
            new SqlParameter("@Transaction_Date",    this.Transaction_Date),
            new SqlParameter("@Transaction_No_Auto", this.AutoGeneratedNumber),
            new SqlParameter("@CGL_Branch_Auto",     this.CGL_Branch_Auto),
            new SqlParameter("@CG_Engineer_Name",    this.CG_Engineer_Name),
            new SqlParameter("@Claim_No",            this.Claim_No),
            new SqlParameter("@Spare_Code",          this.Spare_Code),
            new SqlParameter("@Spare_Description",   this.Spare_Description),
            new SqlParameter("@UOM",                 this.UOM),
            new SqlParameter("@Defective_Loc_Code",  this.Defective_Loc_Code),
            new SqlParameter("@Stock",               this.Stock),
            new SqlParameter("@Destroyed_Qty",       this.Destroyed_Qty),
            new SqlParameter("@Balanced_Qty",        this.Balanced_Qty)
        };

        sqlParamI[0].Direction = ParameterDirection.Output;
        sqlParamI[1].Direction = ParameterDirection.ReturnValue;
        objSql.ExecuteNonQuery(CommandType.StoredProcedure, "uspDestructionDefectiveSpares", sqlParamI);
        this.ReturnValue = Convert.ToInt32(sqlParamI[1].Value.ToString());
        this.MessageOut  = sqlParamI[0].Value.ToString();
        sqlParamI        = null;
    }
 public void UpdateData()
 {
     SqlParameter[] sqlParam =
     {
         new SqlParameter("@internalbillno", this.billno),
         new SqlParameter("@destroyedby",    this.destroyedby),
         new SqlParameter("@ComplaintNo",    this.ComplaintNo),
         new SqlParameter("@Type",           "UPDATE_DATA"),
     };
     objsql.ExecuteNonQuery(CommandType.StoredProcedure, "uspDestructibleSpareAndServiceActivityList", sqlParam);
 }
コード例 #19
0
 public string  Update()
 {
     SqlParameter[] sqlParamI =
     {
         new SqlParameter("@MessageOut",           SqlDbType.VarChar,           200),
         new SqlParameter("@Return_Value",         SqlDbType.Int),
         new SqlParameter("@Type",                 "UPDATE_DATA"),
         new SqlParameter("@challanno",            this.challanno),
         new SqlParameter("@challanby",            this.ChallanBy),
         new SqlParameter("@challandate",          this.challandate),
         new SqlParameter("@transportationdetail", this.TransportationDetails),
         new SqlParameter("@DefId",                this.DefId)
     };
     sqlParamI[0].Direction = ParameterDirection.Output;
     sqlParamI[1].Direction = ParameterDirection.ReturnValue;
     objsql.ExecuteNonQuery(CommandType.StoredProcedure, "uspDefectiveSpareChallan", sqlParamI);
     strMsg    = sqlParamI[0].Value.ToString();
     sqlParamI = null;
     return(strMsg);
 }
コード例 #20
0
    // Bhawesh 27-28 Sep 12
    public void SaveData()
    {
        SqlParameter[] sqlParamI =
        {
            new SqlParameter("@MessageOut",      SqlDbType.VarChar,                         200),
            new SqlParameter("@Type",            "INSERT_SPARE_REQUIREMENT"),
            new SqlParameter("@Asc_Code",        this.Asc_Code),
            new SqlParameter("@ProductDivision", this.ProductDivisionId),
            new SqlParameter("@Product",         this.ProductId),
            new SqlParameter("@ComplaintNo",     this.Complaint_No),
            new SqlParameter("@SpareId",         this.SpareId),
            new SqlParameter("@CurrentStock",    this.CurrentStock),
            new SqlParameter("@Proposed_Qty",    this.ProposedQuantity),
            new SqlParameter("@Active_Flag",     this.ActiveFlag),
            new SqlParameter("@EmpCode",         Membership.GetUser().UserName.ToString()),
        };

        sqlParamI[0].Direction = ParameterDirection.Output;
        DataTable dt  = DataTableSpareReqComplt;
        int       suc = 0;

        foreach (DataRow dr in dt.Rows)
        {
            sqlParamI[2].Value = Convert.ToInt32(dr["ASC_Id"]);
            sqlParamI[3].Value = Convert.ToInt32(dr["ProductDivision_Id"]);
            sqlParamI[4].Value = Convert.ToInt32(dr["Product_SNo"]);
            sqlParamI[5].Value = dr["Complaint_No"].ToString();
            sqlParamI[6].Value = Convert.ToInt32(dr["Spare_Id"]);
            sqlParamI[7].Value = Convert.ToInt32(dr["Current_Stock"]);
            sqlParamI[8].Value = Convert.ToInt32(dr["Proposed_Qty"]);
            sqlParamI[9].Value = dr["Active_Flag"].Equals("1");

            suc             = objSql.ExecuteNonQuery(CommandType.StoredProcedure, "uspSpareRequirementForComplaint", sqlParamI);
            this.MessageOut = Convert.ToString(sqlParamI[0].Value);
            if (MessageOut != "")
            {
                break;
            }
        }
        sqlParamI = null;
    }
コード例 #21
0
    /// <summary>
    /// Activity can be deleted By EICs from Claim Approval Screen
    /// </summary>
    /// <param name="ActivityID"></param>
    /// <returns></returns>

    public int DeleteActivity()
    {
        SqlParameter[] sqlParamS =
        {
            new SqlParameter("@CGuser",                     this.CGuser),
            new SqlParameter("@Activity_Cost_Complaint_ID", Activity_Cost_Complaint_ID),
            new SqlParameter("@DeletionReason",             Deletion_Reason),
            new SqlParameter("@ComplaintNo",                this.Complaint_No),
            new SqlParameter("@Type",                       "DEL_ACTIVITY_ID")
        };
        return(objsql.ExecuteNonQuery(CommandType.StoredProcedure, "uspClaimApprovalWarrantyComplaints", sqlParamS));
    }
コード例 #22
0
 //Save new cost center
 public void SaveCostCenter()
 {
     SqlParameter[] sqlParamI =
     {
         new SqlParameter("@MessageOut",       SqlDbType.VarChar,                  1000),
         new SqlParameter("@Return_Value",     SqlDbType.Int),
         new SqlParameter("@Cost_Center_Code", this.CostCenterCode),
         new SqlParameter("@Cost_Center_Desc", this.CostCenterDesc),
         new SqlParameter("@Division",         this.DivisionID),
         new SqlParameter("@BA_Code",          this.BACode),
         new SqlParameter("@CreatedBy",        this.ActionBy),
         new SqlParameter("@Active_Flag",      Convert.ToInt32(this.Active_Flag)),
         new SqlParameter("@Type",             this.Type)
     };
     sqlParamI[0].Direction = ParameterDirection.Output;
     sqlParamI[1].Direction = ParameterDirection.ReturnValue;
     objSqlDAL.ExecuteNonQuery(CommandType.StoredProcedure, "uspSAPCostCenter", sqlParamI);
     this.ReturnValue = Convert.ToInt32(sqlParamI[1].Value.ToString());
     this.MessageOut  = sqlParamI[0].Value.ToString();
     sqlParamI        = null;
 }
コード例 #23
0
    // The below will delete record and takes first paramenter as Stored Proc or Sql Query
    // second argument as whether this is proc or query i.e. true for stored proc and flase for sql query
    // third parameter is passed sql parameters
    public int DeleteRecord(string strProcOrQuery, bool isProc, SqlParameter sqlParam)
    {
        try
        {
            if (isProc)
            {
                objSql.ExecuteNonQuery(CommandType.StoredProcedure, strProcOrQuery, sqlParam);
            }
            else
            {
                objSql.ExecuteNonQuery(CommandType.Text, strProcOrQuery, sqlParam);
            }

            return(1);
        }
        catch (Exception ex)
        {
            SIMSCommonClass.WriteErrorErrFile(Request.RawUrl.ToString(), ex.StackTrace.ToString() + "-->" + ex.Message.ToString());
            return(0);
        }
    }
コード例 #24
0
    //end by rajiv

    #region Reject Complaint
    public void RejectComplaintValue()
    {
        SqlParameter[] sqlParamS =
        {
            new SqlParameter("@IdComplaint",     this.ComplaintId),
            new SqlParameter("@RejectionReason", this.Reason),
            new SqlParameter("@ApprovedBy",      this.ApprovedBy),
            new SqlParameter("@ComplaintNo",     this.complaint_no),
            new SqlParameter("@Type",            "REJECT_COMPLAINT"),
            new SqlParameter("@EmpCode",         Membership.GetUser().UserName.ToString())
        };
        objsql.ExecuteNonQuery(CommandType.StoredProcedure, "uspSpareConsumptionAndActivityDetails", sqlParamS);

        sqlParamS = null;
    }
コード例 #25
0
 public void SaveSpareMaster()
 {
     SqlParameter[] sqlParamI =
     {
         new SqlParameter("@MessageOut",         SqlDbType.VarChar,                 1000),
         new SqlParameter("@Return_Value",       SqlDbType.Int),
         new SqlParameter("@ReturnSpareId",      SqlDbType.Int),
         new SqlParameter("@SpareId",            this.SpareId),
         new SqlParameter("@ProductDivision_Id", this.ProductDivision_Id),
         new SqlParameter("@SpareCode",          this.SpareCode),
         new SqlParameter("@SpareDesc",          this.SpareDesc),
         new SqlParameter("@UOM",                this.UOM),
         new SqlParameter("@Listprice",          this.Listprice),
         new SqlParameter("@Materialgroup",      this.Materialgroup),
         new SqlParameter("@MaterialType",       this.MaterialType),
         new SqlParameter("@SpareObsolete",      this.SpareObsolete),
         new SqlParameter("@SpareMoving",        this.SpareMoving),
         new SqlParameter("@SpareValue",         this.SpareValue),
         new SqlParameter("@EssentialSpare",     this.EssentialSpare),
         new SqlParameter("@SpareType",          this.SpareType),
         new SqlParameter("@MinimumOrder",       this.MinimumOrder),
         new SqlParameter("@Discount",           this.Discount),
         new SqlParameter("@fpSparephoto",       this.fpSparephoto),
         new SqlParameter("@Sparedisposal",      this.Sparedisposal),
         new SqlParameter("@SpareAction",        this.SpareAction),
         new SqlParameter("@CreatedBy",          this.ActionBy),
         new SqlParameter("@Active_Flag",        Convert.ToInt32(this.ActiveFlag)),
         new SqlParameter("@Type",               this.ActionType)
     };
     sqlParamI[0].Direction = ParameterDirection.Output;
     sqlParamI[1].Direction = ParameterDirection.ReturnValue;
     sqlParamI[2].Direction = ParameterDirection.Output;
     objSqlDAL.ExecuteNonQuery(CommandType.StoredProcedure, "uspSpareMaster", sqlParamI);
     this.ReturnValue = Convert.ToInt32(sqlParamI[1].Value.ToString());
     this.MessageOut  = sqlParamI[0].Value.ToString();
     this.SpareId     = sqlParamI[2].Value.ToString();
     sqlParamI        = null;
 }
コード例 #26
0
    public void SaveData()
    {
        SqlParameter[] sqlParamI =
        {
            new SqlParameter("@MessageOut",           SqlDbType.VarChar,                           200),
            new SqlParameter("@Return_Value",         SqlDbType.Int),
            new SqlParameter("@Type",                 this.ActionType),
            new SqlParameter("@CreatedBy",            this.ActionBy),
            new SqlParameter("@Active_Flag",                                                   1),
            new SqlParameter("@Transaction_No",       this.AutoGeneratedNumber),
            new SqlParameter("@Transaction_Date",     this.Transaction_Date),
            new SqlParameter("@SIMS_Indent_No",       this.SIMS_Indent_No),
            new SqlParameter("@PO_Number",            this.PO_Number),
            new SqlParameter("@SAP_Sales_Order",      this.SAP_Sales_Order),
            new SqlParameter("@SAP_Invoice_No",       this.SAP_Invoice_No),
            new SqlParameter("@SAP_Invoice_Date",     this.SAP_Invoice_Date),
            new SqlParameter("@SAP_Challan_No",       this.SAP_Challan_No),
            new SqlParameter("@SAP_Challan_Date",     this.SAP_Challan_Date),
            new SqlParameter("@Is_Part_Delivery",     this.Is_Part_Delivery),
            new SqlParameter("@ASC_Id",               this.ASC_Id),
            new SqlParameter("@ProductDivision_Id",   this.ProductDivision_Id),
            new SqlParameter("@Spare_Id",             this.Spare_Id),
            new SqlParameter("@Ordered_Qty",          this.Ordered_Qty),
            new SqlParameter("@Dispatched_Qty",       this.Dispatched_Qty),
            new SqlParameter("@Received_Qty",         this.Received_Qty),
            new SqlParameter("@Pending_Qty",          this.Pending_Qty),
            new SqlParameter("@Short_Qty",            this.Short_Qty),
            new SqlParameter("@Inter_SAP_Invoice_ID", Convert.ToInt32(this.Inter_SAP_Invoice_ID)),
            new SqlParameter("@Defective_Qty",        this.Defective_Qty)
        };

        sqlParamI[0].Direction = ParameterDirection.Output;
        sqlParamI[1].Direction = ParameterDirection.ReturnValue;
        objSql.ExecuteNonQuery(CommandType.StoredProcedure, "uspSalesOrderReceipts", sqlParamI);
        this.ReturnValue = Convert.ToInt32(sqlParamI[1].Value.ToString());
        this.MessageOut  = sqlParamI[0].Value.ToString();
        sqlParamI        = null;
    }
コード例 #27
0
    public string UpdateDraftIndentData(string strType)
    {
        SqlParameter[] sqlParamI =
        {
            new SqlParameter("@MessageOut",          SqlDbType.VarChar,         200),
            new SqlParameter("@Return_Value",        SqlDbType.Int),
            new SqlParameter("@Type",                strType),
            new SqlParameter("@EmpCode",             this.EmpCode),
            new SqlParameter("@Draft_No",            this.Draft_No),
            new SqlParameter("@PO_Number",           this.PO_Number),
            new SqlParameter("@ASC_Id",              this.ASC_Id),
            new SqlParameter("@Sales_Order_Type_Id", this.Sales_Order_Type_Id),
            new SqlParameter("@Tax_Form_Type_Id",    this.Tax_Form_Type_Id),
            new SqlParameter("@Inco_Terms_Id",       this.Inco_Terms_Id),
            new SqlParameter("@Consignee_Details",   this.Consignee_Details),
            new SqlParameter("@AddressLine1",        this.AddressLine1),
            new SqlParameter("@AddressLine2",        this.AddressLine2),
            new SqlParameter("@AddressLine3",        this.AddressLine3),
            new SqlParameter("@City",                this.City),
            new SqlParameter("@State",               this.State),
            new SqlParameter("@Pin_Code",            this.Pin_Code),
            new SqlParameter("@ECC_No",              this.ECC_No),
            new SqlParameter("@TIN_Number",          this.TIN_Number)
        };

        sqlParamI[0].Direction = ParameterDirection.Output;
        sqlParamI[1].Direction = ParameterDirection.ReturnValue;
        objSql.ExecuteNonQuery(CommandType.StoredProcedure, "uspSpareRequirementIndentConfirm", sqlParamI);
        if (int.Parse(sqlParamI[1].Value.ToString()) == -1)
        {
            this.ReturnValue = int.Parse(sqlParamI[1].Value.ToString());
        }
        strMsg    = sqlParamI[0].Value.ToString();
        sqlParamI = null;
        return(strMsg);
    }
コード例 #28
0
    public int UpdateData()
    {
        int count = 0;

        SqlParameter[] sqlParam =
        {
            new SqlParameter("@Internal_Bill_No", this.BillNo),
            new SqlParameter("@BillBy",           this.BillBy),
            new SqlParameter("@ComplaintNo",      this.ComplaintNo),
            new SqlParameter("@MISComplaint_Id",  this.MISComplaint_Id),
            new SqlParameter("@Item_Type",        this.Item_Type),
            new SqlParameter("@Item_Id",          this.Item_Id),
            new SqlParameter("@ReturnValue",      SqlDbType.Int),
            new SqlParameter("@Type",             "UPDATE_DATA"),
        };
        sqlParam[6].Direction = ParameterDirection.Output;
        objsql.ExecuteNonQuery(CommandType.StoredProcedure, "uspGenerateInternalBill", sqlParam);
        count = int.Parse(sqlParam[6].Value.ToString());
        return(count);
    }
コード例 #29
0
    public string SaveData(string strType)
    {
        SqlParameter[] sqlParamI =
        {
            new SqlParameter("@MessageOut",        SqlDbType.VarChar,                     200),
            new SqlParameter("@Type",              strType),
            new SqlParameter("@SC_SNo",            this.SCSNo),
            new SqlParameter("@SC_Code",           this.SCCode),
            new SqlParameter("@SC_UserName",       this.SCUserName),
            new SqlParameter("@SC_Name",           this.SCName),
            new SqlParameter("@SAP_Customer_Code", this.SAP_Customer_Code),
            new SqlParameter("@SAP_Vendor_Code",   this.SAP_Vendor_Code),
            new SqlParameter("@Contact_Person",    this.ContactPerson),
            new SqlParameter("@Region_SNo",        this.BranchSNo),
            new SqlParameter("@Branch_SNo",        this.BranchSNo),
            new SqlParameter("@State_SNo",         this.StateSno),
            new SqlParameter("@City_SNo",          this.CitySNo),
            new SqlParameter("@Address1",          this.Address1),
            new SqlParameter("@Address2",          this.Address2),
            new SqlParameter("@EmailID",           this.EmailID),
            new SqlParameter("@PhoneNo",           this.PhoneNo),
            new SqlParameter("@MobileNo",          this.MobileNo),
            new SqlParameter("@Preference",        this.Prefernce),
            new SqlParameter("@SpecialRemarks",    this.SpecialRemarks),
            new SqlParameter("@FaxNo",             this.FaxNo),
            new SqlParameter("@Weekly_Off_Day",    this.WeekOffDay),
            new SqlParameter("@EmpCode",           this.EmpCode),
            new SqlParameter("@Active_Flag",       int.Parse(this.ActiveFlag)),
            new SqlParameter("@Branch_Plant_SNo",  Convert.ToInt32(this.BranchPlantSNo)),
            // new SqlParameter("@CreditNote_Threshold_Amount",Convert.ToDecimal(this.CreditNoteThresholdAmount)),
            //new SqlParameter("@CreditNote_Generation_Day",Convert.ToInt32(this.CreditNoteGenerationDay)),
            new SqlParameter("@ECC_Number",        this.ECC_Number),
            new SqlParameter("@TIN_Number",        this.TIN_Number)
        };

        sqlParamI[0].Direction = ParameterDirection.Output;
        objSql.ExecuteNonQuery(CommandType.StoredProcedure, "uspServiceContractorMaster", sqlParamI);
        strMsg    = sqlParamI[0].Value.ToString();
        sqlParamI = null;
        return(strMsg);
    }
コード例 #30
0
 public void SaveParameterMaster()
 {
     SqlParameter[] sqlParamI =
     {
         new SqlParameter("@MessageOut",         SqlDbType.VarChar,                 1000),
         new SqlParameter("@Return_Value",       SqlDbType.Int),
         new SqlParameter("@ParameterId",        this.ParameterId),
         new SqlParameter("@ProductDivision_Id", this.ProductDivision_Id),
         new SqlParameter("@ParameterCode",      this.ParameterCode),
         new SqlParameter("@ParameterDesc",      this.ParameterDesc),
         new SqlParameter("@CreatedBy",          this.ActionBy),
         new SqlParameter("@Active_Flag",        Convert.ToInt32(this.ActiveFlag)),
         new SqlParameter("@Type",               this.ActionType)
     };
     sqlParamI[0].Direction = ParameterDirection.Output;
     sqlParamI[1].Direction = ParameterDirection.ReturnValue;
     objSqlDAL.ExecuteNonQuery(CommandType.StoredProcedure, "uspParameterMaster", sqlParamI);
     this.ReturnValue = Convert.ToInt32(sqlParamI[1].Value.ToString());
     this.MessageOut  = sqlParamI[0].Value.ToString();
     sqlParamI        = null;
 }