Beispiel #1
0
        public static bool InspectionPlan_INS(int InspectionID, int InspectionHistoryID, string EmployeeID, string FarmerID, DateTime PlanDate, DateTime VisitDate, string CreatedBy, string ModifiedBy)
        {
            bool                result = false;
            MudarDBHelper       mdbh   = MudarDBHelper.Instance;
            MudarSPName         sp     = new MudarSPName();
            List <SqlParameter> Params = new List <SqlParameter>();

            Params.Add(mdbh.AddParameter("InspectionID", SqlDbType.Int, InspectionID));
            Params.Add(mdbh.AddParameter("InspectionHistoryID", SqlDbType.Int, InspectionHistoryID));
            Params.Add(mdbh.AddParameter("EmployeeID", SqlDbType.UniqueIdentifier, new Guid(EmployeeID)));
            Params.Add(mdbh.AddParameter("FarmerID", SqlDbType.UniqueIdentifier, new Guid(FarmerID)));
            Params.Add(mdbh.AddParameter("PlanDate", SqlDbType.DateTime, PlanDate));
            Params.Add(mdbh.AddParameter("VisitDate", SqlDbType.DateTime, VisitDate));
            Params.Add(mdbh.AddParameter("CreatedBy", SqlDbType.NVarChar, CreatedBy));
            Params.Add(mdbh.AddParameter("ModifiedBy", SqlDbType.NVarChar, ModifiedBy));
            Params.Add(mdbh.AddParameter("ReturnValue", SqlDbType.Bit, result, Param_Directions.Param_Out));
            try
            {
                result = (bool)mdbh.ExecuteNonQuery(sp.sp_InspectionPlan_INS, Params);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(result);
        }
Beispiel #2
0
        public static bool InspectionHistory_INSandUPDandDEL(int InspectioHistoryID, int Year, string PlanName, int SeasonID, string CreatedBY, string ModifiedBy, ref int NewHistoryId)
        {
            bool                result = false;
            MudarDBHelper       mdbh   = MudarDBHelper.Instance;
            MudarSPName         sp     = new MudarSPName();
            List <SqlParameter> Params = new List <SqlParameter>();
            List <string>       output = new List <string>();

            Params.Add(mdbh.AddParameter("InspectioHistoryID", SqlDbType.Int, InspectioHistoryID));
            Params.Add(mdbh.AddParameter("Year", SqlDbType.Int, Year));
            Params.Add(mdbh.AddParameter("PlanName", SqlDbType.NVarChar, PlanName));
            Params.Add(mdbh.AddParameter("SeasonID", SqlDbType.Int, SeasonID));
            Params.Add(mdbh.AddParameter("CreatedBY", SqlDbType.NVarChar, CreatedBY));
            Params.Add(mdbh.AddParameter("ModifiedBy", SqlDbType.NVarChar, ModifiedBy));
            Params.Add(mdbh.AddParameter("ReturnValue", SqlDbType.Bit, result, Param_Directions.Param_Out));
            Params.Add(mdbh.AddParameter("ReturnHistoryID", SqlDbType.Int, NewHistoryId, Param_Directions.Param_Out));
            try
            {
                mdbh.ExecuteNonQuery(sp.sp_InspectionHistory_INSandUPDandDEL, Params, ref output);
                if (output.Count >= 2)
                {
                    result       = Convert.ToBoolean(output[0]);
                    NewHistoryId = Convert.ToInt32(output[1]);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(result);
        }
Beispiel #3
0
        public static DataSet GetGeneralInspectionDetails()
        {
            MudarSPName   sp   = new MudarSPName();
            MudarDBHelper mdbh = MudarDBHelper.Instance;

            return(mdbh.ExecuteDataSet(sp.sp_getGeneralInspectionDetails));
        }
        public static bool SupplierPriceandPaymentDetails_INSandUPDandDEL(string SupplierId, bool Exworks, bool ExSuppliersPlace, bool ForDestination, string PaymentTerm, string CreatedBy, string ModifiedBy, int TypeOfOperation)
        {
            bool                result = false;
            MudarDBHelper       mdbh   = MudarDBHelper.Instance;
            MudarSPName         sp     = new MudarSPName();
            List <SqlParameter> Params = new List <SqlParameter>();

            Params.Add(mdbh.AddParameter("SupplierId", SqlDbType.UniqueIdentifier, new Guid(SupplierId)));
            Params.Add(mdbh.AddParameter("Exworks", SqlDbType.Bit, Exworks));
            Params.Add(mdbh.AddParameter("ExSuppliersPlace", SqlDbType.Bit, ExSuppliersPlace));
            Params.Add(mdbh.AddParameter("ForDestination", SqlDbType.Bit, ForDestination));
            Params.Add(mdbh.AddParameter("PaymentTerm", SqlDbType.NVarChar, PaymentTerm));
            Params.Add(mdbh.AddParameter("CreatedBy", SqlDbType.NVarChar, CreatedBy));
            Params.Add(mdbh.AddParameter("ModifiedBy", SqlDbType.NVarChar, ModifiedBy));
            Params.Add(mdbh.AddParameter("TypeOfOperation", SqlDbType.Int, TypeOfOperation));
            Params.Add(mdbh.AddParameter("ReturnValue", SqlDbType.Bit, result, Param_Directions.Param_Out));
            try
            {
                result = (bool)mdbh.ExecuteNonQuery(sp.sp_SupplierPriceandPaymentTermsDetails_INSandUPDandDEL, Params);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(result);
        }
Beispiel #5
0
        public static DataTable GetFinicalYear()
        {
            MudarSPName   sp   = new MudarSPName();
            MudarDBHelper mdbh = MudarDBHelper.Instance;

            return(mdbh.ExecuteDataTable(sp.sp_GetFinicalYear, "FYear"));
        }
Beispiel #6
0
        public static bool BuyerComplaintInsertDetails(string complaint, string ComplaintBy, string BuyerID, string InvoiceID, int InvoiceProductID, DateTime InvoiceDate, decimal ProductQty, string BatchNo, string Action, string CreatedBy, string ModifiedBy, int TypeOfOperation, int ComplaintType)
        {
            bool                result = false;
            MudarDBHelper       mdbh   = MudarDBHelper.Instance;
            MudarSPName         sp     = new MudarSPName();
            List <SqlParameter> Params = new List <SqlParameter>();

            Params.Add(mdbh.AddParameter("Complaint", SqlDbType.NVarChar, complaint));
            Params.Add(mdbh.AddParameter("ComplaintBy", SqlDbType.NVarChar, ComplaintBy));
            Params.Add(mdbh.AddParameter("BuyerId", SqlDbType.UniqueIdentifier, new Guid(BuyerID)));
            Params.Add(mdbh.AddParameter("InvoiceId", SqlDbType.NVarChar, InvoiceID));
            Params.Add(mdbh.AddParameter("InvoiceProductID", SqlDbType.Int, InvoiceProductID));
            Params.Add(mdbh.AddParameter("InvoiceDate", SqlDbType.DateTime, InvoiceDate));
            Params.Add(mdbh.AddParameter("ProductQuantity", SqlDbType.Decimal, ProductQty));
            Params.Add(mdbh.AddParameter("BatchNo", SqlDbType.NVarChar, BatchNo));
            Params.Add(mdbh.AddParameter("Action", SqlDbType.NVarChar, Action));
            Params.Add(mdbh.AddParameter("CreatedBy", SqlDbType.NVarChar, CreatedBy));
            Params.Add(mdbh.AddParameter("ModifiedBy", SqlDbType.NVarChar, ModifiedBy));
            Params.Add(mdbh.AddParameter("TypeOfOperation", SqlDbType.Int, TypeOfOperation));
            Params.Add(mdbh.AddParameter("ComplaintType", SqlDbType.Int, ComplaintType));
            Params.Add(mdbh.AddParameter("ReturnValue", SqlDbType.Bit, result, Param_Directions.Param_Out));
            try
            {
                result = (bool)mdbh.ExecuteNonQuery(sp.sp_BuyerComplaintDetails_INS_UPD_DEL, Params);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(result);
        }
Beispiel #7
0
        public static bool FarmerFamilyDetails_INS(int FarmerFamilyId, string FarmerId, string ChildName, string Gender, DateTime DOB, int Age, bool SchoolGoing, bool Working, string CreatedBy, string ModifiedBy, int TypeOfOPeration, int NumberEarningPersons, int ElderDependents)
        {
            bool                result = false;
            MudarDBHelper       mdbh   = MudarDBHelper.Instance;
            MudarSPName         sp     = new MudarSPName();
            List <SqlParameter> Params = new List <SqlParameter>();

            Params.Add(mdbh.AddParameter("FarmerFamilyId", SqlDbType.Int, FarmerFamilyId));
            Params.Add(mdbh.AddParameter("FarmerId", SqlDbType.UniqueIdentifier, new Guid(FarmerId)));
            Params.Add(mdbh.AddParameter("Name", SqlDbType.NVarChar, ChildName));
            Params.Add(mdbh.AddParameter("Gender ", SqlDbType.NVarChar, Gender));
            Params.Add(mdbh.AddParameter("DOB ", SqlDbType.DateTime, DOB));
            Params.Add(mdbh.AddParameter("AGE ", SqlDbType.Int, Age));
            Params.Add(mdbh.AddParameter("SchoolGoing", SqlDbType.Bit, SchoolGoing));
            Params.Add(mdbh.AddParameter("Working", SqlDbType.Bit, Working));
            Params.Add(mdbh.AddParameter("TypeOfOPeration", SqlDbType.Int, TypeOfOPeration));
            Params.Add(mdbh.AddParameter("CreatedBy", SqlDbType.NVarChar, CreatedBy));
            Params.Add(mdbh.AddParameter("ModifiedBy", SqlDbType.NVarChar, ModifiedBy));
            Params.Add(mdbh.AddParameter("ElderDependents", SqlDbType.Int, ElderDependents));
            Params.Add(mdbh.AddParameter("NumberEarningPersons", SqlDbType.Int, NumberEarningPersons));
            Params.Add(mdbh.AddParameter("ReturnValue", SqlDbType.Bit, result, Param_Directions.Param_Out));
            try
            {
                result = (bool)mdbh.ExecuteNonQuery(sp.sp_FarmerFamilyDetails, Params);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(result);
        }
Beispiel #8
0
        public static bool Role_INT_UPT_DEL(string RoleID, string RoleName, string createdby, string modifiedby, int typeOperation)
        {
            bool                Result = false;
            MudarSPName         sp     = new MudarSPName();
            MudarDBHelper       mdbh   = MudarDBHelper.Instance;
            List <SqlParameter> Params = new List <SqlParameter>();

            Params.Add(mdbh.AddParameter("RoleId", SqlDbType.UniqueIdentifier, new Guid(RoleID)));
            Params.Add(mdbh.AddParameter("RoleName", SqlDbType.NVarChar, RoleName));
            Params.Add(mdbh.AddParameter("CreatedBy", SqlDbType.NVarChar, createdby));
            Params.Add(mdbh.AddParameter("ModifiedBy", SqlDbType.NVarChar, modifiedby));
            Params.Add(mdbh.AddParameter("TypeOperation", SqlDbType.Int, typeOperation));
            Params.Add(mdbh.AddParameter("ReturnValue", SqlDbType.Bit, Result, Param_Directions.Param_Out));

            try
            {
                Result = (bool)mdbh.ExecuteNonQuery(sp.sp_Roles_INSandUPD, Params);
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(Result);
        }
Beispiel #9
0
        public static bool Employee_INS_UPT_DEL(string EmployeeId, string EmployeeName, string BranchId, string Phonenumber, string Mnumber, string address, string city, string taluk, string district, string state, string country, string CreatedBy, string ModifiedBy, int TypeOfOperation)
        {
            bool result = false;

            MudarSPName         sp     = new MudarSPName();
            MudarDBHelper       mdbh   = MudarDBHelper.Instance;
            List <SqlParameter> Params = new List <SqlParameter>();

            Params.Add(mdbh.AddParameter("EmployeeId", SqlDbType.UniqueIdentifier, new Guid(EmployeeId)));
            Params.Add(mdbh.AddParameter("EmployeeFristName", SqlDbType.NVarChar, EmployeeName));
            Params.Add(mdbh.AddParameter("BranchId", SqlDbType.UniqueIdentifier, new Guid(BranchId)));
            Params.Add(mdbh.AddParameter("Phone", SqlDbType.NVarChar, Phonenumber));
            Params.Add(mdbh.AddParameter("Mphone", SqlDbType.NVarChar, Mnumber));
            Params.Add(mdbh.AddParameter("Address", SqlDbType.NVarChar, address));
            Params.Add(mdbh.AddParameter("City", SqlDbType.NVarChar, city));
            Params.Add(mdbh.AddParameter("Taluk", SqlDbType.NVarChar, taluk));
            Params.Add(mdbh.AddParameter("District", SqlDbType.NVarChar, district));
            Params.Add(mdbh.AddParameter("State", SqlDbType.NVarChar, state));
            Params.Add(mdbh.AddParameter("Country", SqlDbType.NVarChar, country));
            Params.Add(mdbh.AddParameter("CreatedBy", SqlDbType.NVarChar, CreatedBy));
            Params.Add(mdbh.AddParameter("ModifiedBy", SqlDbType.NVarChar, ModifiedBy));
            Params.Add(mdbh.AddParameter("TypeOfOperation", SqlDbType.Int, TypeOfOperation));
            Params.Add(mdbh.AddParameter("ReturnValue", SqlDbType.Bit, result, Param_Directions.Param_Out));

            try
            {
                result = (bool)mdbh.ExecuteNonQuery(sp.sp_EmployeeDetails_INSandUPDandDEL, Params);
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(result);
        }
Beispiel #10
0
        public static bool MentholPercentageDetailsINS(int PerID, int Year, int ProductID, decimal Percentage, string CreatedBy, string ModifiedBy, int TypeOfOperation)
        {
            bool                result = false;
            MudarDBHelper       mdbh   = MudarDBHelper.Instance;
            MudarSPName         sp     = new MudarSPName();
            List <SqlParameter> Params = new List <SqlParameter>();

            Params.Add(mdbh.AddParameter("PerID", SqlDbType.Int, PerID));
            Params.Add(mdbh.AddParameter("Year", SqlDbType.Int, Year));
            Params.Add(mdbh.AddParameter("ProductID", SqlDbType.Int, ProductID));
            Params.Add(mdbh.AddParameter("Percentage", SqlDbType.Decimal, Percentage));
            Params.Add(mdbh.AddParameter("CreatedBy", SqlDbType.NVarChar, CreatedBy));
            Params.Add(mdbh.AddParameter("ModifiedBy", SqlDbType.NVarChar, ModifiedBy));
            Params.Add(mdbh.AddParameter("TypeOperation", SqlDbType.Int, TypeOfOperation));
            Params.Add(mdbh.AddParameter("ReturnValue", SqlDbType.Bit, result, Param_Directions.Param_Out));
            try
            {
                result = (bool)mdbh.ExecuteNonQuery(sp.sp_MentholPerDetails_INSandUPDandDEL, Params);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(result);
        }
Beispiel #11
0
        public static bool FiledRiskt_Result_INSandUPDandDEL(int FieldRiskID, string FarmerID, int FarmID, bool Result, string CreatedBy, string ModifiedBy, int TypeOfOperation)
        {
            bool                returnResult = false;
            MudarDBHelper       mdbh         = MudarDBHelper.Instance;
            MudarSPName         sp           = new MudarSPName();
            List <SqlParameter> Params       = new List <SqlParameter>();

            Params.Add(mdbh.AddParameter("FarmerID", SqlDbType.UniqueIdentifier, new Guid(FarmerID)));
            Params.Add(mdbh.AddParameter("FieldRiskID", SqlDbType.Int, FieldRiskID));
            Params.Add(mdbh.AddParameter("FarmID", SqlDbType.Int, FarmID));
            Params.Add(mdbh.AddParameter("Result", SqlDbType.Bit, Result));
            Params.Add(mdbh.AddParameter("TypeOfOperation", SqlDbType.Int, TypeOfOperation));
            Params.Add(mdbh.AddParameter("CreatedBy", SqlDbType.NVarChar, CreatedBy));
            Params.Add(mdbh.AddParameter("ModifiedBy", SqlDbType.NVarChar, ModifiedBy));
            Params.Add(mdbh.AddParameter("ReturnValue", SqlDbType.Bit, returnResult, Param_Directions.Param_Out));
            try
            {
                returnResult = (bool)mdbh.ExecuteNonQuery(sp.sp_FieldRisk_Farmer_INSandUPDandDEL, Params);
                return(returnResult);
            }
            catch (Exception)
            {
                return(returnResult);
            }
        }
Beispiel #12
0
        public static bool BuyerTransPortDetails_INSandUPDandDEL(string BuyerID, int Transportmode, string SeaportName, string AirportName, string RoadDestination, string RailStation, string CreatedBy, string ModifiedBy, int TypeOfOperation)
        {
            bool                result = false;
            MudarDBHelper       mdbh   = MudarDBHelper.Instance;
            MudarSPName         sp     = new MudarSPName();
            List <SqlParameter> Params = new List <SqlParameter>();

            Params.Add(mdbh.AddParameter("BuyerID", SqlDbType.UniqueIdentifier, new Guid(BuyerID)));
            Params.Add(mdbh.AddParameter("ModeofTransport", SqlDbType.Int, Transportmode));
            Params.Add(mdbh.AddParameter("SeaportName", SqlDbType.NVarChar, SeaportName));
            Params.Add(mdbh.AddParameter("AirportName", SqlDbType.NVarChar, AirportName));
            Params.Add(mdbh.AddParameter("RoadDestination", SqlDbType.NVarChar, RoadDestination));
            Params.Add(mdbh.AddParameter("RailStation", SqlDbType.NVarChar, RailStation));
            Params.Add(mdbh.AddParameter("CreatedBy", SqlDbType.NVarChar, CreatedBy));
            Params.Add(mdbh.AddParameter("ModifiedBy", SqlDbType.NVarChar, ModifiedBy));
            Params.Add(mdbh.AddParameter("TypeOfOperation", SqlDbType.Int, TypeOfOperation));
            Params.Add(mdbh.AddParameter("ReturnValue", SqlDbType.Bit, result, Param_Directions.Param_Out));
            try
            {
                result = (bool)mdbh.ExecuteNonQuery(sp.sp_BuyerTransportDetails_INSandUPDandDEL, Params);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(result);
        }
Beispiel #13
0
        //Code to insert/Update/Delete in tblFarmerCheckPoints
        public static bool FarmerCheckPoints_INSandUPDandDEL(string FarmerID, int QuestionID, int Answer, string Note, string CreatedBy, string ModifiedBy, int TypeOfOperation, int Year)
        {
            bool                result = false;
            MudarDBHelper       mdbh   = MudarDBHelper.Instance;
            MudarSPName         sp     = new MudarSPName();
            List <SqlParameter> Params = new List <SqlParameter>();

            Params.Add(mdbh.AddParameter("FarmerID", SqlDbType.UniqueIdentifier, new Guid(FarmerID)));
            Params.Add(mdbh.AddParameter("QuestionID", SqlDbType.Int, QuestionID));
            Params.Add(mdbh.AddParameter("Answer", SqlDbType.Int, Answer));
            Params.Add(mdbh.AddParameter("Note", SqlDbType.NVarChar, Note));
            Params.Add(mdbh.AddParameter("CreatedBy", SqlDbType.NVarChar, CreatedBy));
            Params.Add(mdbh.AddParameter("ModifiedBy", SqlDbType.NVarChar, ModifiedBy));
            Params.Add(mdbh.AddParameter("TypeOfOperation", SqlDbType.Int, TypeOfOperation));
            Params.Add(mdbh.AddParameter("Year", SqlDbType.Int, Year));
            Params.Add(mdbh.AddParameter("ReturnValue", SqlDbType.Bit, result, Param_Directions.Param_Out));

            try
            {
                result = (bool)mdbh.ExecuteNonQuery(sp.sp_FarmerCheckPoints_INSandUPDandDEL, Params);
                return(result);
            }
            catch (Exception)
            {
                return(result);
            }
        }
Beispiel #14
0
        public static bool BuyerPaymentandPriceUpdateDetails(string BuyerID, bool advance100, bool Fiftyadv50againstDocs, bool HundredagainstDocs, bool NoofDaysfromInvoice, int No_of_Days_Count_fromInvoice, int TypeOfOperation, string ModifiedBy)
        {
            bool                result = false;
            MudarDBHelper       mdbh   = MudarDBHelper.Instance;
            MudarSPName         sp     = new MudarSPName();
            List <SqlParameter> Params = new List <SqlParameter>();

            Params.Add(mdbh.AddParameter("BuyerID", SqlDbType.UniqueIdentifier, new Guid(BuyerID)));
            Params.Add(mdbh.AddParameter("100advance", SqlDbType.Bit, advance100));
            Params.Add(mdbh.AddParameter("50adv50againstDocs", SqlDbType.Bit, Fiftyadv50againstDocs));
            Params.Add(mdbh.AddParameter("100againstDocs", SqlDbType.Bit, HundredagainstDocs));
            Params.Add(mdbh.AddParameter("NoofDaysfromInvoice", SqlDbType.Bit, NoofDaysfromInvoice));
            Params.Add(mdbh.AddParameter("No_of_Days_Count_fromInvoice", SqlDbType.Int, No_of_Days_Count_fromInvoice));
            Params.Add(mdbh.AddParameter("TypeOfOperation", SqlDbType.Int, TypeOfOperation));
            Params.Add(mdbh.AddParameter("ReturnValue", SqlDbType.Bit, result, Param_Directions.Param_Out));
            Params.Add(mdbh.AddParameter("ModifiedBy", SqlDbType.NVarChar, ModifiedBy));
            try
            {
                result = (bool)mdbh.ExecuteNonQuery(sp.sp_UPD_Buyer_PaymentandPriceandTransport_Details, Params);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(result);
        }
Beispiel #15
0
        public static int Season_INT_UPT(int SeasonID, string Seasonname, DateTime StartDate, DateTime EndDate, string createdby, string modifiedby, int typeOperation, int SeasonYear)
        {
            int                 Result = 0;
            MudarSPName         sp     = new MudarSPName();
            MudarDBHelper       mdbh   = MudarDBHelper.Instance;
            List <SqlParameter> Params = new List <SqlParameter>();

            Params.Add(mdbh.AddParameter("SeasonID", SqlDbType.Int, SeasonID));
            Params.Add(mdbh.AddParameter("SeasonName", SqlDbType.NVarChar, Seasonname));
            Params.Add(mdbh.AddParameter("StartDate", SqlDbType.DateTime, StartDate));
            Params.Add(mdbh.AddParameter("EndDate", SqlDbType.DateTime, EndDate));
            Params.Add(mdbh.AddParameter("CreatedBy", SqlDbType.NVarChar, createdby));
            Params.Add(mdbh.AddParameter("ModifiedBy", SqlDbType.NVarChar, modifiedby));
            Params.Add(mdbh.AddParameter("TypeOfOperation", SqlDbType.Int, typeOperation));
            Params.Add(mdbh.AddParameter("ReturnValue", SqlDbType.Int, Result, Param_Directions.Param_Out));
            Params.Add(mdbh.AddParameter("SeasonYear", SqlDbType.Int, SeasonYear));
            try
            {
                Result = (int)mdbh.ExecuteNonQuery(sp.sp_season, Params);
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(Result);
        }
        public static bool InvoiceProductDetailsINSandUPDandDEL(string InvoiceId, int ProductId, decimal Netweight, decimal Grossweight, decimal PriceforKG, int TotalDrums, decimal TotalAmount, string CreatedBy, string ModifiedBy, int TypeOfOperation)
        {
            bool                Result = false;
            MudarSPName         sp     = new MudarSPName();
            MudarDBHelper       mdbh   = MudarDBHelper.Instance;
            List <SqlParameter> Params = new List <SqlParameter>();

            Params.Add(mdbh.AddParameter("InvoiceId", SqlDbType.NVarChar, InvoiceId));
            Params.Add(mdbh.AddParameter("ProductId", SqlDbType.Int, ProductId));
            Params.Add(mdbh.AddParameter("Netweight", SqlDbType.Decimal, Netweight));
            Params.Add(mdbh.AddParameter("Grossweight", SqlDbType.Decimal, Grossweight));
            Params.Add(mdbh.AddParameter("PriceforKG", SqlDbType.Decimal, PriceforKG));
            Params.Add(mdbh.AddParameter("TotalDrums", SqlDbType.Int, TotalDrums));
            Params.Add(mdbh.AddParameter("TotalAmount", SqlDbType.Decimal, TotalAmount));
            Params.Add(mdbh.AddParameter("CreatedBy", SqlDbType.NVarChar, CreatedBy));
            Params.Add(mdbh.AddParameter("ModifiedBy", SqlDbType.NVarChar, ModifiedBy));
            Params.Add(mdbh.AddParameter("TypeOfOperation", SqlDbType.Int, TypeOfOperation));
            Params.Add(mdbh.AddParameter("ReturnValue", SqlDbType.Bit, Result, Param_Directions.Param_Out));
            try
            {
                Result = (bool)mdbh.ExecuteNonQuery(sp.sp_InvoiceProductDetails_INSandUPDandDEL, Params);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(Result);
        }
Beispiel #17
0
        public static bool BuyerApproval(string BuyerID, string ModifiedBy, bool Approval, bool Lotsample, string BCode, decimal Discount, decimal FairTrade, decimal FairTradPremium, int valueType)
        {
            bool                result = false;
            MudarDBHelper       mdbh   = MudarDBHelper.Instance;
            MudarSPName         sp     = new MudarSPName();
            List <SqlParameter> Params = new List <SqlParameter>();

            Params.Add(mdbh.AddParameter("BuyerID", SqlDbType.UniqueIdentifier, new Guid(BuyerID)));
            Params.Add(mdbh.AddParameter("ModifiedBy", SqlDbType.NVarChar, ModifiedBy));
            Params.Add(mdbh.AddParameter("ReturnValue", SqlDbType.Bit, result, Param_Directions.Param_Out));
            Params.Add(mdbh.AddParameter("Approval", SqlDbType.Bit, Approval));
            Params.Add(mdbh.AddParameter("Lotsample", SqlDbType.Bit, Lotsample));
            Params.Add(mdbh.AddParameter("BCode", SqlDbType.NVarChar, BCode));
            Params.Add(mdbh.AddParameter("Discount", SqlDbType.Decimal, Discount));
            Params.Add(mdbh.AddParameter("FairTrade", SqlDbType.Decimal, FairTrade));
            Params.Add(mdbh.AddParameter("FairTradPremium", SqlDbType.Decimal, FairTradPremium));
            Params.Add(mdbh.AddParameter("valueType", SqlDbType.Int, valueType));
            try
            {
                result = (bool)mdbh.ExecuteNonQuery(sp.sp_CheckBuyerApporval, Params);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(result);
        }
        public static bool InvoiceInsert(int OrderId, int BranchOrderID, string PriceTerms, string Transport, string OriginCountry, string LoadingPort, string PaymentTerms, string FreightTerms, string DestinationCountry, string DestinationPort, DateTime OrderDate, string CreatedBy, string ModifiedBy, int TypeOfOperation, string InvoiceID)
        {
            bool                Result = false;
            MudarSPName         sp     = new MudarSPName();
            MudarDBHelper       mdbh   = MudarDBHelper.Instance;
            List <SqlParameter> Params = new List <SqlParameter>();

            Params.Add(mdbh.AddParameter("OrderID", SqlDbType.Int, OrderId));
            Params.Add(mdbh.AddParameter("BranchOrderID", SqlDbType.Int, BranchOrderID));
            Params.Add(mdbh.AddParameter("PriceTerms", SqlDbType.NVarChar, PriceTerms));
            Params.Add(mdbh.AddParameter("Transport", SqlDbType.NVarChar, Transport));
            Params.Add(mdbh.AddParameter("OriginCountry", SqlDbType.NVarChar, OriginCountry));
            Params.Add(mdbh.AddParameter("LoadingPort", SqlDbType.NVarChar, LoadingPort));
            Params.Add(mdbh.AddParameter("PaymentTerms", SqlDbType.NVarChar, PaymentTerms));
            Params.Add(mdbh.AddParameter("FreightTerms", SqlDbType.NVarChar, FreightTerms));
            Params.Add(mdbh.AddParameter("DestinationCountry", SqlDbType.NVarChar, DestinationCountry));
            Params.Add(mdbh.AddParameter("DestinationPort", SqlDbType.NVarChar, DestinationPort));
            Params.Add(mdbh.AddParameter("OrderDate", SqlDbType.Date, OrderDate));
            Params.Add(mdbh.AddParameter("OrderDispachDate", SqlDbType.Date, DateTime.Now));
            Params.Add(mdbh.AddParameter("CreatedBy", SqlDbType.NVarChar, CreatedBy));
            Params.Add(mdbh.AddParameter("ModifiedBy", SqlDbType.NVarChar, ModifiedBy));
            Params.Add(mdbh.AddParameter("TypeOfOperation", SqlDbType.Int, TypeOfOperation));
            Params.Add(mdbh.AddParameter("ReturnValue", SqlDbType.Bit, Result, Param_Directions.Param_Out));
            Params.Add(mdbh.AddParameter("InvoiceId", SqlDbType.NVarChar, InvoiceID));
            try
            {
                Result = (bool)mdbh.ExecuteNonQuery(sp.sp_InvoiceDetails_INSandUPDandDEL, Params);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(Result);
        }
        public static bool WaterTransaction_INT_UPT_DEL(int WaterMID, string WITT_Irrigation, string WITT_Days, string WITT_Period, string WITT_Planting, string CreatedBy, string ModifiedBy, int TypeOfOperation, int WITTId)
        {
            bool                Result = false;
            MudarSPName         sp     = new MudarSPName();
            MudarDBHelper       mdbh   = MudarDBHelper.Instance;
            List <SqlParameter> Params = new List <SqlParameter>();

            Params.Add(mdbh.AddParameter("WaterMID", SqlDbType.Int, WaterMID));

            Params.Add(mdbh.AddParameter("WITT_Irrigation", SqlDbType.NVarChar, WITT_Irrigation));
            Params.Add(mdbh.AddParameter("WITT_Days", SqlDbType.NVarChar, WITT_Days));
            Params.Add(mdbh.AddParameter("WITT_Period", SqlDbType.NVarChar, WITT_Period));
            Params.Add(mdbh.AddParameter("WITT_Planting", SqlDbType.NVarChar, WITT_Planting));
            Params.Add(mdbh.AddParameter("WITTId", SqlDbType.Int, WITTId));
            Params.Add(mdbh.AddParameter("CreatedBy", SqlDbType.NVarChar, CreatedBy));
            Params.Add(mdbh.AddParameter("ModifiedBy", SqlDbType.NVarChar, ModifiedBy));
            Params.Add(mdbh.AddParameter("TypeOfOperation", SqlDbType.Int, TypeOfOperation));
            Params.Add(mdbh.AddParameter("ReturnValue", SqlDbType.Bit, Result, Param_Directions.Param_Out));
            try
            {
                List <string> output = new List <string>();
                Result = (bool)mdbh.ExecuteNonQuery(sp.sp_tblWaterInfoTransaction_INSandUPDandDEL, Params);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(Result);
        }
        public static bool InputTransaction_INT_UPT_DEL(int InputMID, string IM_MT_HC, string IMDays, string IMPeriod, string IMPlanting, string CreatedBy, string ModifiedBy, int TypeOfOperation, int InputMTId)
        {
            bool                Result = false;
            MudarSPName         sp     = new MudarSPName();
            MudarDBHelper       mdbh   = MudarDBHelper.Instance;
            List <SqlParameter> Params = new List <SqlParameter>();

            Params.Add(mdbh.AddParameter("InputMID", SqlDbType.Int, InputMID));
            Params.Add(mdbh.AddParameter("IM_MT_HC", SqlDbType.NVarChar, IM_MT_HC));
            Params.Add(mdbh.AddParameter("IMDays", SqlDbType.NVarChar, IMDays));
            Params.Add(mdbh.AddParameter("IMPeriod", SqlDbType.NVarChar, IMPeriod));
            Params.Add(mdbh.AddParameter("IMPlanting", SqlDbType.NVarChar, IMPlanting));
            Params.Add(mdbh.AddParameter("InputMTId", SqlDbType.Int, InputMTId));
            Params.Add(mdbh.AddParameter("CreatedBy", SqlDbType.NVarChar, CreatedBy));
            Params.Add(mdbh.AddParameter("ModifiedBy", SqlDbType.NVarChar, ModifiedBy));
            Params.Add(mdbh.AddParameter("TypeOfOperation", SqlDbType.Int, TypeOfOperation));
            Params.Add(mdbh.AddParameter("ReturnValue", SqlDbType.Bit, Result, Param_Directions.Param_Out));
            //Params.Add(mdbh.AddParameter("rInputMTId", SqlDbType.Int, rInputMTId, Param_Directions.Param_Out));
            try
            {
                List <string> output = new List <string>();
                Result = (bool)mdbh.ExecuteNonQuery(sp.sp_tblInputTransaction_INSandUPDandDEL, Params);
                //if (output.Count >= 2)
                //{
                //    Result = Convert.ToBoolean(output[0]);
                //    rInputMTId = Convert.ToInt32(!string.IsNullOrEmpty(output[1]) ? output[1] : "0");
                //}
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(Result);
        }
Beispiel #21
0
        public static bool UserInRoles_INS_UPD_DEL(string RoleId, string UserId, string createdBy, string Modifiedby, int TypeOfOperation)
        {
            bool result = false;

            MudarSPName         sp     = new MudarSPName();
            MudarDBHelper       mdbh   = MudarDBHelper.Instance;
            List <SqlParameter> Params = new List <SqlParameter>();

            Params.Add(mdbh.AddParameter("RoleId", SqlDbType.UniqueIdentifier, new Guid(RoleId)));
            Params.Add(mdbh.AddParameter("UserID", SqlDbType.UniqueIdentifier, new Guid(UserId)));
            Params.Add(mdbh.AddParameter("CreatedBy", SqlDbType.NVarChar, createdBy));
            Params.Add(mdbh.AddParameter("ModifiedBy", SqlDbType.NVarChar, Modifiedby));
            Params.Add(mdbh.AddParameter("TypeOfOperation", SqlDbType.Int, TypeOfOperation));
            Params.Add(mdbh.AddParameter("ReturnValue", SqlDbType.Bit, result, Param_Directions.Param_Out));

            try
            {
                result = (bool)mdbh.ExecuteNonQuery(sp.sp_UserInRoles_INSandUPDandDEL, Params);
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(result);
        }
Beispiel #22
0
        public static DataTable GetProductPrice()
        {
            MudarSPName   sp   = new MudarSPName();
            MudarDBHelper mdbh = MudarDBHelper.Instance;

            return(mdbh.ExecuteDataTable(sp.sp_GetProductPrice));
        }
Beispiel #23
0
        public static bool Category_INT_UPT(int categoryID, string categoryname, string createdby, string modifiedby, int typeOperation)
        {
            bool                Result = false;
            MudarSPName         sp     = new MudarSPName();
            MudarDBHelper       mdbh   = MudarDBHelper.Instance;
            List <SqlParameter> Params = new List <SqlParameter>();

            Params.Add(mdbh.AddParameter("CategoryID", SqlDbType.Int, categoryID));
            Params.Add(mdbh.AddParameter("CategoryName", SqlDbType.NVarChar, categoryname));
            Params.Add(mdbh.AddParameter("CreatedBy", SqlDbType.NVarChar, createdby));
            Params.Add(mdbh.AddParameter("ModifiedBy", SqlDbType.NVarChar, modifiedby));
            Params.Add(mdbh.AddParameter("Delete", SqlDbType.Bit, false));
            Params.Add(mdbh.AddParameter("TypeOperation", SqlDbType.Int, typeOperation));
            Params.Add(mdbh.AddParameter("ReturnValue", SqlDbType.Bit, Result, Param_Directions.Param_Out));
            try
            {
                Result = (bool)mdbh.ExecuteNonQuery(sp.sp_CategoryDetails_INSandUPD, Params);
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(Result);
        }
        public static bool sp_FarmerProduction_UPD(DateTime PlantationDate, DateTime FirstHarvestDate, decimal FirstHerbaga, DateTime FirstDistillationDate, decimal FirstProductQuantity
                                                   , DateTime SecondHarvestDate, decimal SecondHerbaga, DateTime SecondDistillationDate, decimal SecondProductQuantity, decimal TotalProductQuantity,
                                                   int PlantationId, decimal EstiFiHerbage, decimal EstiFOilqty, decimal EstiSeHerbage, decimal EstiSeOilqty)
        {
            bool                output = false;
            MudarDBHelper       mdbh   = MudarDBHelper.Instance;
            MudarSPName         sp     = new MudarSPName();
            List <SqlParameter> Params = new List <SqlParameter>();

            Params.Add(mdbh.AddParameter("PlantationDate", SqlDbType.DateTime, PlantationDate));
            Params.Add(mdbh.AddParameter("FirstHarvestDate", SqlDbType.DateTime, FirstHarvestDate));
            Params.Add(mdbh.AddParameter("FirstHerbaga", SqlDbType.Decimal, FirstHerbaga));
            Params.Add(mdbh.AddParameter("FirstDistillationDate", SqlDbType.DateTime, FirstDistillationDate));
            Params.Add(mdbh.AddParameter("FirstProductQuantity", SqlDbType.Decimal, FirstProductQuantity));
            Params.Add(mdbh.AddParameter("SecondHarvestDate", SqlDbType.DateTime, SecondHarvestDate));
            Params.Add(mdbh.AddParameter("SecondHerbaga", SqlDbType.Decimal, SecondHerbaga));
            Params.Add(mdbh.AddParameter("SecondDistillationDate", SqlDbType.DateTime, SecondDistillationDate));
            Params.Add(mdbh.AddParameter("SecondProductQuantity", SqlDbType.Decimal, SecondProductQuantity));
            Params.Add(mdbh.AddParameter("TotalProductQuantity", SqlDbType.Decimal, TotalProductQuantity));
            Params.Add(mdbh.AddParameter("EstimationFHerbaga", SqlDbType.Decimal, EstiFiHerbage));
            Params.Add(mdbh.AddParameter("EstimationFProductQuantity", SqlDbType.Decimal, EstiFOilqty));
            Params.Add(mdbh.AddParameter("EstimationSHerbaga", SqlDbType.Decimal, EstiSeHerbage));
            Params.Add(mdbh.AddParameter("EstimationSProductQuantity", SqlDbType.Decimal, EstiSeOilqty));
            Params.Add(mdbh.AddParameter("PlantationId", SqlDbType.Decimal, PlantationId));
            Params.Add(mdbh.AddParameter("ReturnValue", SqlDbType.Bit, output, Param_Directions.Param_Out));
            try
            {
                output = (bool)mdbh.ExecuteNonQuery(sp.sp_FarmerProduction_UPD, Params);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(output);
        }
Beispiel #25
0
        public static bool FarmerSeasonProduct_INSandUPTandDELNEW(int SeasonID, string FarmerID, string SeasonName, string CropCultivating, bool Result, string CreatedBy, string ModifiedBy, DateTime StartDate, DateTime EndDate, int SeasonYear, int ProductId, int TypeOfOperation)
        {
            bool                output = false;
            MudarDBHelper       mdbh   = MudarDBHelper.Instance;
            MudarSPName         sp     = new MudarSPName();
            List <SqlParameter> Params = new List <SqlParameter>();

            Params.Add(mdbh.AddParameter("FarmerId", SqlDbType.UniqueIdentifier, new Guid(FarmerID)));
            Params.Add(mdbh.AddParameter("SeasonName", SqlDbType.NVarChar, SeasonName));
            Params.Add(mdbh.AddParameter("CropCultivating", SqlDbType.NVarChar, CropCultivating));
            Params.Add(mdbh.AddParameter("Result", SqlDbType.Bit, Result));
            Params.Add(mdbh.AddParameter("CreatedBy", SqlDbType.NVarChar, CreatedBy));
            Params.Add(mdbh.AddParameter("ModifiedBy", SqlDbType.NVarChar, ModifiedBy));
            Params.Add(mdbh.AddParameter("StartDate", SqlDbType.DateTime, StartDate));
            Params.Add(mdbh.AddParameter("EndDate", SqlDbType.DateTime, EndDate));
            Params.Add(mdbh.AddParameter("SeasonYear", SqlDbType.Int, SeasonYear));
            Params.Add(mdbh.AddParameter("ProductId", SqlDbType.Int, ProductId));
            Params.Add(mdbh.AddParameter("TypeOfOperation", SqlDbType.Int, TypeOfOperation));
            Params.Add(mdbh.AddParameter("SeasonID", SqlDbType.Int, SeasonID));
            Params.Add(mdbh.AddParameter("ReturnValue", SqlDbType.Bit, output, Param_Directions.Param_Out));

            try
            {
                output = (bool)mdbh.ExecuteNonQuery(sp.sp_SeasonDetails_INSandUPDandDELNew, Params);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(output);
        }
Beispiel #26
0
        public static bool Product_INT_UPT_DEL(int ProductID, string ProductCode, string ProductName, string Description, string ItcHsCode, int CategoryID, string CreatedBy, string ModifiedBy, int typeOperation, string Specification)
        {
            bool                Result = false;
            MudarSPName         sp     = new MudarSPName();
            MudarDBHelper       mdbh   = MudarDBHelper.Instance;
            List <SqlParameter> Params = new List <SqlParameter>();

            Params.Add(mdbh.AddParameter("ProductID", SqlDbType.Int, ProductID));
            Params.Add(mdbh.AddParameter("ProductCode", SqlDbType.NVarChar, ProductCode));
            Params.Add(mdbh.AddParameter("ProductName", SqlDbType.NVarChar, ProductName));
            Params.Add(mdbh.AddParameter("Description", SqlDbType.NVarChar, Description));
            Params.Add(mdbh.AddParameter("ItcHsCode", SqlDbType.NVarChar, ItcHsCode));
            Params.Add(mdbh.AddParameter("CategoryID", SqlDbType.Int, CategoryID));
            Params.Add(mdbh.AddParameter("CreatedBy", SqlDbType.NVarChar, CreatedBy));
            Params.Add(mdbh.AddParameter("ModifiedBy", SqlDbType.NVarChar, ModifiedBy));
            //Params.Add(mdbh.AddParameter("SeasonID", SqlDbType.Int, SeasonID));
            Params.Add(mdbh.AddParameter("TypeOperation", SqlDbType.Int, typeOperation));
            Params.Add(mdbh.AddParameter("Specification", SqlDbType.NVarChar, Specification));
            Params.Add(mdbh.AddParameter("ReturnValue", SqlDbType.Bit, Result, Param_Directions.Param_Out));
            try
            {
                Result = (bool)mdbh.ExecuteNonQuery(sp.sp_Product_INSandUPDandDEL, Params);
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(Result);
        }
Beispiel #27
0
        public static bool Farmer_INSandUPTandDEL(string FarmerId, string FarmerCode, string FirstName, string FarmerMIECode, string FarmerAPEDACode, decimal TotalAreaInHectares, int NumberOfPlots, string FatherName, string Address, string City_Village, string Taluk, string District, string State, string Country, string PhoneNumber, string MobileNumber, string BankInfo, string BankAccNo, int ChildrenDependents, int ElderlyDependents, int NumberOfEarningPersons, string ChildrenStudies, int Cow, int Ox, int Sheep, int OtherAnimals, bool ProposedFieldOfficer, bool ProposedManager, bool InternalInspectorApproval, bool PRESIDNT, string CreatedBy, string ModifiedBy, string FarmerRegNumber, string PhotoPath, int TypeOfOPeration, DateTime ChemicalAppDate, string BankHolderName, bool Organic, bool OrganicFair, string icsCode)
        {
            bool                result = false;
            MudarDBHelper       mdbh   = MudarDBHelper.Instance;
            MudarSPName         sp     = new MudarSPName();
            List <SqlParameter> Params = new List <SqlParameter>();

            Params.Add(mdbh.AddParameter("FarmerId", SqlDbType.UniqueIdentifier, new Guid(FarmerId)));
            Params.Add(mdbh.AddParameter("FarmerCode", SqlDbType.NVarChar, FarmerCode));
            Params.Add(mdbh.AddParameter("FirstName", SqlDbType.NVarChar, FirstName));
            Params.Add(mdbh.AddParameter("FarmerMIECode", SqlDbType.NVarChar, FarmerMIECode));
            Params.Add(mdbh.AddParameter("FarmerAPEDACode", SqlDbType.NVarChar, FarmerAPEDACode));
            Params.Add(mdbh.AddParameter("TotalAreaInHectares", SqlDbType.Decimal, TotalAreaInHectares));
            Params.Add(mdbh.AddParameter("NumberOfPlots", SqlDbType.Int, NumberOfPlots));
            Params.Add(mdbh.AddParameter("FatherName", SqlDbType.NVarChar, FatherName));
            Params.Add(mdbh.AddParameter("Address", SqlDbType.NVarChar, Address));
            Params.Add(mdbh.AddParameter("City_Village", SqlDbType.NVarChar, City_Village));
            Params.Add(mdbh.AddParameter("Taluk", SqlDbType.NVarChar, Taluk));
            Params.Add(mdbh.AddParameter("District", SqlDbType.NVarChar, District));
            Params.Add(mdbh.AddParameter("State", SqlDbType.NVarChar, State));
            Params.Add(mdbh.AddParameter("Country", SqlDbType.NVarChar, Country));
            Params.Add(mdbh.AddParameter("PhoneNumber", SqlDbType.NVarChar, PhoneNumber));
            Params.Add(mdbh.AddParameter("MobileNumber", SqlDbType.NVarChar, MobileNumber));
            Params.Add(mdbh.AddParameter("BankInfo", SqlDbType.NVarChar, BankInfo));
            Params.Add(mdbh.AddParameter("BankAccNo", SqlDbType.NVarChar, BankAccNo));
            Params.Add(mdbh.AddParameter("ChildrenDependents", SqlDbType.Int, ChildrenDependents));
            Params.Add(mdbh.AddParameter("ElderlyDependents", SqlDbType.Int, ElderlyDependents));
            Params.Add(mdbh.AddParameter("NumberOfEarningPersons", SqlDbType.Int, NumberOfEarningPersons));
            Params.Add(mdbh.AddParameter("ChildrenStudies", SqlDbType.NVarChar, ChildrenStudies));
            Params.Add(mdbh.AddParameter("Cow", SqlDbType.Int, Cow));
            Params.Add(mdbh.AddParameter("Ox", SqlDbType.Int, Ox));
            Params.Add(mdbh.AddParameter("Sheep", SqlDbType.Int, Sheep));
            Params.Add(mdbh.AddParameter("OtherAnimals", SqlDbType.Int, OtherAnimals));
            Params.Add(mdbh.AddParameter("ProposedFieldOfficer", SqlDbType.Bit, ProposedFieldOfficer));
            Params.Add(mdbh.AddParameter("ProposedManager", SqlDbType.Bit, ProposedManager));
            Params.Add(mdbh.AddParameter("InternalInspectorApproval", SqlDbType.Bit, InternalInspectorApproval));
            Params.Add(mdbh.AddParameter("PRESIDNT", SqlDbType.Bit, PRESIDNT));
            Params.Add(mdbh.AddParameter("CreatedBy", SqlDbType.NVarChar, CreatedBy));
            Params.Add(mdbh.AddParameter("ModifiedBy", SqlDbType.NVarChar, ModifiedBy));
            Params.Add(mdbh.AddParameter("FarmerRegNumber", SqlDbType.NVarChar, FarmerRegNumber));
            Params.Add(mdbh.AddParameter("PhotoPath", SqlDbType.NVarChar, PhotoPath));
            Params.Add(mdbh.AddParameter("TypeOfOPeration", SqlDbType.Int, TypeOfOPeration));
            Params.Add(mdbh.AddParameter("ReturnValue", SqlDbType.Bit, result, Param_Directions.Param_Out));
            Params.Add(mdbh.AddParameter("ChemicalAppDate", SqlDbType.DateTime, ChemicalAppDate));
            Params.Add(mdbh.AddParameter("BankHolderName", SqlDbType.NVarChar, BankHolderName));
            Params.Add(mdbh.AddParameter("Organic", SqlDbType.Bit, Organic));
            Params.Add(mdbh.AddParameter("OrganicFair", SqlDbType.Bit, OrganicFair));
            Params.Add(mdbh.AddParameter("ICSType", SqlDbType.VarChar, icsCode));
            try
            {
                result = (bool)mdbh.ExecuteNonQuery(sp.sp_FarmerDetails_INSandUPDandDEL, Params);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(result);
        }
        public static bool UpdatePlantationDetails(string FarmerId, int FarmID, decimal PlotArea, string AreaCode, decimal Latitude, decimal Longitude, int ParentFarmID, int ProductId, string UnitId, DateTime PlantationDate, DateTime FirstHarvestDate, decimal FirstHerbaga, DateTime FirstDistillationDate, int FirstDistillationUnitNO, decimal FirstProductQuantity
                                                   , DateTime SecondHarvestDate, decimal SecondHerbaga, DateTime SecondDistillationDate
                                                   , int SecondDistillationUnitNO, decimal SecondProductQuantity, decimal TotalProductQuantity, bool ProposedFieldOfficer, bool ProposedManager
                                                   , string CreatedBy, string ModifiedBy, int SeasonID, decimal PlantationArea, int TypeOfOperation, int PlantationId, string FirstUnitId, string SecondUnitId,
                                                   int FirstNoOfLots, int SecondNoOfLots, string FirstLotNos, string SecondLotNos, int FYear, bool IsInterCrop, decimal EstiFiHerbage, decimal EstiFOilqty, decimal EstiSeHerbage, decimal EstiSeOilqty)
        {
            bool                output = false;
            MudarDBHelper       mdbh   = MudarDBHelper.Instance;
            MudarSPName         sp     = new MudarSPName();
            List <SqlParameter> Params = new List <SqlParameter>();

            Params.Add(mdbh.AddParameter("FarmerId", SqlDbType.UniqueIdentifier, new Guid(FarmerId)));
            //FarmID
            Params.Add(mdbh.AddParameter("FarmID", SqlDbType.Int, FarmID));
            Params.Add(mdbh.AddParameter("ParentFarmID", SqlDbType.Int, ParentFarmID));
            Params.Add(mdbh.AddParameter("PlotArea", SqlDbType.Decimal, PlotArea));
            //Plantation.
            Params.Add(mdbh.AddParameter("ProductId", SqlDbType.Int, ProductId));
            Params.Add(mdbh.AddParameter("PlantationId", SqlDbType.Int, PlantationId));
            Params.Add(mdbh.AddParameter("PlantationDate", SqlDbType.DateTime, PlantationDate));
            Params.Add(mdbh.AddParameter("FirstHarvestDate", SqlDbType.DateTime, FirstHarvestDate));
            Params.Add(mdbh.AddParameter("FirstHerbaga", SqlDbType.Decimal, FirstHerbaga));
            Params.Add(mdbh.AddParameter("FirstDistillationDate", SqlDbType.DateTime, FirstDistillationDate));
            Params.Add(mdbh.AddParameter("FirstDistillationUnitNO", SqlDbType.Int, FirstDistillationUnitNO));
            Params.Add(mdbh.AddParameter("FirstProductQuantity", SqlDbType.Decimal, FirstProductQuantity));
            Params.Add(mdbh.AddParameter("SecondHarvestDate", SqlDbType.DateTime, SecondHarvestDate));
            Params.Add(mdbh.AddParameter("SecondHerbaga", SqlDbType.Decimal, SecondHerbaga));
            Params.Add(mdbh.AddParameter("SecondDistillationDate", SqlDbType.DateTime, SecondDistillationDate));
            Params.Add(mdbh.AddParameter("SecondDistillationUnitNO", SqlDbType.Int, SecondDistillationUnitNO));
            Params.Add(mdbh.AddParameter("SecondProductQuantity", SqlDbType.Decimal, SecondProductQuantity));
            Params.Add(mdbh.AddParameter("TotalProductQuantity", SqlDbType.Decimal, TotalProductQuantity));
            Params.Add(mdbh.AddParameter("CreatedBy", SqlDbType.NVarChar, CreatedBy));
            Params.Add(mdbh.AddParameter("ModifiedBy", SqlDbType.NVarChar, ModifiedBy));
            Params.Add(mdbh.AddParameter("SeasonID", SqlDbType.Int, SeasonID));
            Params.Add(mdbh.AddParameter("PlantationArea", SqlDbType.Decimal, PlantationArea));
            Params.Add(mdbh.AddParameter("FirstUnitId", SqlDbType.UniqueIdentifier, new Guid(FirstUnitId)));
            Params.Add(mdbh.AddParameter("SecondUnitId", SqlDbType.UniqueIdentifier, new Guid(SecondUnitId)));
            Params.Add(mdbh.AddParameter("FirstNoOfLots", SqlDbType.Int, FirstNoOfLots));
            Params.Add(mdbh.AddParameter("SecondNoOfLots", SqlDbType.Int, SecondNoOfLots));
            Params.Add(mdbh.AddParameter("FirstLotNos", SqlDbType.NVarChar, FirstLotNos));
            Params.Add(mdbh.AddParameter("SecondLotNos", SqlDbType.NVarChar, SecondLotNos));
            Params.Add(mdbh.AddParameter("TypeOfOperation", SqlDbType.Int, TypeOfOperation));
            Params.Add(mdbh.AddParameter("ReturnValue", SqlDbType.Bit, output, Param_Directions.Param_Out));
            Params.Add(mdbh.AddParameter("FYear", SqlDbType.Int, FYear));
            Params.Add(mdbh.AddParameter("EstimationFHerbaga", SqlDbType.Decimal, EstiFiHerbage));
            Params.Add(mdbh.AddParameter("EstimationFProductQuantity", SqlDbType.Decimal, EstiFOilqty));
            Params.Add(mdbh.AddParameter("EstimationSHerbaga", SqlDbType.Decimal, EstiSeHerbage));
            Params.Add(mdbh.AddParameter("EstimationSProductQuantity", SqlDbType.Decimal, EstiSeOilqty));
            try
            {
                output = (bool)mdbh.ExecuteNonQuery(sp.sp_UPD_FarmPlot_PlantationDetails, Params);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(output);
        }
Beispiel #29
0
        public static DataTable GetProductionYear(DateTime date)
        {
            MudarSPName         sp     = new MudarSPName();
            MudarDBHelper       mdbh   = MudarDBHelper.Instance;
            List <SqlParameter> Params = new List <SqlParameter>();

            Params.Add(mdbh.AddParameter("Date", SqlDbType.SmallDateTime, date));
            return(mdbh.ExecuteDataTable(sp.sp_GetProductionYear, Params, "PYear"));
        }
        public static DataTable GetAviableQtty(int ProductID)
        {
            MudarSPName         sp     = new MudarSPName();
            MudarDBHelper       mdbh   = MudarDBHelper.Instance;
            List <SqlParameter> Params = new List <SqlParameter>();

            Params.Add(mdbh.AddParameter("ProductID", SqlDbType.Int, ProductID));
            return(mdbh.ExecuteDataTable(sp.SP_CheckAvailableQty, Params, "AvailQty"));
        }