示例#1
0
        //InsertFundDetails method we can insert new donation into database
        //by paasing all the value through business class to dataclass if it is
        //inserted then it gives message as successfully inserted
        protected void InsertFundDetails()
        {
            int noOfRowsaffected = 0;

            Objfund.Fundname = fundnametxtbox.Text.Trim();
            string IsAvailabel = string.Empty;

            IsAvailabel = Objfund.chkAvailableFundName();

            if (IsAvailabel == "0")
            {
                try
                {
                    noOfRowsaffected = Objfund.InsertintoFund();
                    Validations.showMessage(lblErrorMsg, Validations.Msg_AddFund, "Success");
                }
                catch (Exception ex)
                {
                }
            }
            else
            {
                Validations.showMessage(lblErrorMsg, "Fund Name" + Validations.Err_Duplicate, "Error");
            }
        }