public DataSet SaveBranchMaster(clsBranch objBranch)
 {
     object[] parameters = new object[] { objBranch.BranchId,
                                          objBranch.AnalysisCategory,
                                          objBranch.BalBF_NRP,
                                          objBranch.CompanyId,
                                          objBranch.BranchCode,
                                          objBranch.BranchName,
                                          objBranch.EffFromDate,
                                          objBranch.EffToDate,
                                          objBranch.Status,
                                          objBranch.LoginUserId,
                                          objBranch.PageMethod,
                                          objBranch.Address1,
                                          objBranch.Address2,
                                          objBranch.Address3,
                                          objBranch.FaxNoPrefx,
                                          objBranch.FaxNo,
                                          objBranch.TelephoneNoPrefx,
                                          objBranch.TelephoneNo,
                                          objBranch.Email,
                                          objBranch.CountryCode,
                                          objBranch.IncludeHeadOffice };
     dataAccessDS = new DataAccess();
     return(dataAccessDS.LoadDataSet(parameters, "P_TM_BranchMaster_InsertUpdate", "BranchDetail"));
 }
Exemplo n.º 2
0
        public void InstanceOK()
        {
            //create an instance of the class we want to create
            clsBranch ABranch = new clsBranch();

            //test to see that it exists
            Assert.IsNotNull(ABranch);
        }
 public DataSet LoadBranch(clsBranch objBranch)
 {
     object[] parameters = new object[1] {
         objBranch.BranchId
     };
     dataAccessDS = new DataAccess();
     return(dataAccessDS.LoadDataSet(parameters, "P_TM_BranchMaster_Select", "BranchSelect"));
 }
 public SqlDataReader getUserBranch(clsBranch objBranch)
 {
     dataAccessDS = new DataAccess();
     Object[] parameters = new Object[2] {
         objBranch.CompanyId, objBranch.LoginUserId
     };
     //Object[] parameters = new Object[3] { objSOB.SOBId, objSOB.SOBName, objSOB.Status };
     //return dataAccess.LoadDataSet(parameters, "P_GetSourceCodeBySOB", "MasterSourceCodeBySOB");
     return(dataAccessDS.GetDataReader(parameters, "P_GetBranchByUserId"));
 }
Exemplo n.º 5
0
        public void Valid()
        {
            //Create an instance of the class we want to create
            clsBranch ABranch = new clsBranch();
            //create a string variable to store the result of the validation
            String Error = "";

            //invoke the method
            Error = ABranch.Valid(BranchID, BranchName, AddressLine, City, Postcode);
            //test to see that the result is OK
            Assert.AreEqual(Error, "");
        }
Exemplo n.º 6
0
        public void BranchPropertyOK()
        {
            //create an instance of the class we want to create
            clsBranch ABranch = new clsBranch();
            //create some test data to assign to the property
            string SomeBranch = "Northampton";

            //assign the data to the property
            ABranch.Branch = SomeBranch;
            //test to see that the two values are the same
            Assert.AreEqual(ABranch.Branch, SomeBranch);
        }
Exemplo n.º 7
0
        public void BranchIDPropertyOK()
        {
            //create an instance of the class we want to create
            clsBranch ABranch = new clsBranch();
            //crate some tests data to assign to the property
            Int32 BranchNo = 1;

            //assign the data to the property
            ABranch.BranchNo = BranchNo;
            //test to see that the two values are the same
            Assert.AreEqual(ABranch.BranchNo, BranchNo);
        }
Exemplo n.º 8
0
        public void ActivePropertyOK()
        {
            //CREATE AN INSTANCE OF THE CLASS WE WANT TO CREATE
            clsBranch AnBranch = new clsBranch();
            //create some test data to assign to the property
            Boolean TestData = true;

            //assign the data to the property
            AnBranch.Active = TestData;
            //test to see that the two values are the same
            Assert.AreEqual(AnBranch.Active, TestData);
        }
Exemplo n.º 9
0
        public void FindMethodOK()
        {
            //create an instance of the class we want to create
            clsBranch AnBranch = new clsBranch();
            //boolean variable to store the result of the validation
            Boolean Found = false;
            //create some test data to use with the method
            Int32 BranchID = 1;

            //invoke the method
            Found = AnBranch.Find(BranchID);
            //test to see that the rewsult is correct
            Assert.IsTrue(Found);
        }
Exemplo n.º 10
0
        private void frmLogin2_Load(object sender, EventArgs e)
        {
            try
            {
                LoadDBSettings();

                #region Load Branches
                cls_Branch = new clsBranch();
                cmbxBranches.DataSource    = cls_Branch.getBranches();
                cmbxBranches.ValueMember   = "Branch_ID";
                cmbxBranches.DisplayMember = "Branch_Name";
                //aaa
                cmbxBranches.SelectedIndex = -1;
                #endregion
                txtUserName.Focus();
            }
            catch (Exception)
            {
                MessageBox.Show("نأسف لقد حدث خطأ");
            }
        }