Exemple #1
0
 public bool DeleteRegistration(SRVRegistration serial)
 {
     try
     {
         if (serial.RegistrationID > 0)
         {
             return _RegistrationDAOLinq.Delete(serial, true);
         }
         else
         {
             return false;
         }
     }
     catch (Exception ex)
     {
         return false;
     }
 }
Exemple #2
0
 /// <summary>
 /// Method to save (add/edit) party object
 /// </summary>
 /// <param name="party"></param>
 /// <returns></returns>
 public bool SaveReport(SRVRegistration party)
 {
     try
     {
         if (party.RegistrationID == 0)
         {
             return new SRVRegistrationDAOLinq().Add(party);
         }
         else
         {
             return new SRVRegistrationDAOLinq().Edit(party);
         }
        // return new SRVRegistrationDAOLinq().Add(party);
     }
     catch (Exception ex)
     {
         return false;
     }
 }
Exemple #3
0
        /// <summary>
        /// Method to save (add/edit) party object
        /// </summary>
        /// <param name="party"></param>
        /// <returns></returns>
        public bool SaveRegistration(SRVRegistration serial)
        {
            try
            {
                if (serial.RegistrationID == 0)
                {
                    return _RegistrationDAOLinq.Add(serial);
                }
                else
                {
                    return _RegistrationDAOLinq.Edit(serial, true);
                }

                //if (_RegistrationDAOLinq.Exists(serial))
                //{
                //    return _RegistrationDAOLinq.Edit(serial, true);
                //}
                //else
                //{
                //    return _RegistrationDAOLinq.Add(serial);
                //}
            }
            catch (Exception ex)
            {
                return false;
            }
        }
Exemple #4
0
 private void DeleteRegistration(int id)
 {
     _Registration = new SRVRegistration();
     _Registration.RegistrationID = id;
     if (new RegistrationManager().DeleteRegistration(_Registration))
     {
         grvRegistration.DataBind();
     }
 }
Exemple #5
0
 partial void DeleteSRVRegistration(SRVRegistration instance);
Exemple #6
0
 partial void UpdateSRVRegistration(SRVRegistration instance);
Exemple #7
0
 partial void InsertSRVRegistration(SRVRegistration instance);
Exemple #8
0
		private void detach_SRVRegistrations(SRVRegistration entity)
		{
			this.SendPropertyChanging();
			entity.INVStockSerial = null;
		}
Exemple #9
0
        private void LoadToAllControlValue(int intRegistrationID)
        {
            if (intRegistrationID > 0)
            {
                _Registration = new RegistrationManager().GetRegistrationByID(intRegistrationID);

                //txtCode.Text = _Registration.RegistrationCode;
                //txtName.Text = _Registration.RegistrationName;
                //txtFather.Text = _Registration.FatherName;
                //ddlType.SelectedValue = _Registration.RegistrationType;
                //txtContactNo.Text = _Registration.ContactNo;
                //ddlGender.SelectedValue = _Registration.Gender;
                //ddlReligion.SelectedValue = _Registration.Religion;

                //txtVillage.Text = _Registration.AreaVillageName;
                //txtPO.Text = _Registration.AreaPOName;
                //ddlDistrict.SelectedValue = _Registration.DistrictID.ToString();
                //ddlUpazila.SelectedValue = _Registration.UpazilaPSID.ToString();
                //txtTel.Text = _Registration.Tel;
                //txtCell.Text = _Registration.Cell;
                //txtEmail.Text = _Registration.Email;
            }
        }
Exemple #10
0
        private SRVRegistration FormToObject(int id)
        {
            if (id <= 0)
            {
                _Registration = new SRVRegistration();

                _Registration.CreatedBy = WebCommonUtility.GetCSMSysUserKey();
                _Registration.CreatedDate = System.DateTime.Now;
            }

            _Registration.ModifiedBy = WebCommonUtility.GetCSMSysUserKey();
            _Registration.ModifiedDate = System.DateTime.Now;

            _Registration.RegistrationID = id;

            //_Registration.RegistrationCode = txtCode.Text;
            //_Registration.RegistrationName = txtName.Text;
            //_Registration.FatherName = txtFather.Text;
            //_Registration.RegistrationType = ddlType.SelectedValue.ToString();
            //_Registration.ContactNo = txtContactNo.Text;
            //_Registration.Gender = ddlGender.SelectedValue.ToString();
            //_Registration.Religion = ddlReligion.SelectedValue.ToString();

            //_Registration.AreaVillageName = txtVillage.Text;
            //_Registration.AreaPOName = txtPO.Text;
            //_Registration.UpazilaPSID = ddlUpazila.SelectedIndex > 0 ? Convert.ToInt32(ddlUpazila.SelectedValue.ToString()) : 0;
            //_Registration.DistrictID = ddlDistrict.SelectedIndex > 0 ? Convert.ToInt32(ddlDistrict.SelectedValue.ToString()) : 0;
            //_Registration.Tel = txtTel.Text;
            //_Registration.Cell = txtCell.Text;
            //_Registration.Email = txtEmail.Text;

            //_Registration.RegistrationCodeName = txtCode.Text + " - " + txtName.Text;
            //_Registration.IsActive = true;

            return _Registration;
        }
Exemple #11
0
        private SRVRegistration FormToObject(int id)
        {
            SRVRegistration tsrv = new SRVRegistration();
            tsrv.SerialID = Convert.ToInt32(txtserid.Text);
            tsrv.PartyID = Convert.ToInt32(txtpartycode.Text);
            tsrv.BagLoan = float.Parse(txtBagloans.Text);
            tsrv.CarryingLoan = float.Parse(txtCarryingCost.Text);
            tsrv.Remarks = txtRemarks.Text;
            tsrv.SerialNo = txtAgreementNo.Text;
            tsrv.CreatedDate = DateTime.Now;
            tsrv.CreatedBy = WebCommonUtility.GetCSMSysUserKey();

            return tsrv;
        }