コード例 #1
0
ファイル: TopUp.cs プロジェクト: Hadisaeed/FYP
        private void txt_RFID_TextChanged(object sender, EventArgs e)
        {
            if (txt_RFID.Text.Length < 10) return;
            {
                BALCust_Registration SearchForTopUp = new BALCust_Registration();
                SearchForTopUp.CRUD = "SearchForTopUp";
                SearchForTopUp.RFID = Convert.ToInt64(txt_RFID.Text);
                RFID = Convert.ToInt64(txt_RFID.Text);
                DataTable dt = new DataTable();
                dt = SearchForTopUp.Cust_Registration(SearchForTopUp);
                if (dt != null && dt.Rows.Count > 0)
                {
                    txt_RFID.Text = null;
                    lbl_Name.Text = dt.Rows[0]["Name"].ToString();
                    lbl_CarNo.Text = dt.Rows[0]["CarNo"].ToString();
                    lbl_CurrentAmount.Text = dt.Rows[0]["CurrentBalance"].ToString();
                    UpdateAmount = Convert.ToInt32(dt.Rows[0]["CurrentBalance"].ToString());
                    lbl_Name.Visible = lbl_CarNo.Visible =lbl_CurrentAmount.Visible=true;
                   

                }
            }
            //if (txt_RegNo.Text.Length == 9)
            //{
            //    BALCust_Registration SearchCustomer = new BALCust_Registration();
            //    SearchCustomer.CRUD = "Search";
            //    DataTable dt = new DataTable();
            //    dt = SearchCustomer.Cust_Registration(SearchCustomer);
            //    if (dt != null && dt.Rows.Count > 0)
            //    {
            //        txt_Name.Text = dt.Rows[0]["Name"].ToString();
            //        txt_FatherName.Text = dt.Rows[0]["FName"].ToString();
            //        txt_NICNo.Text = dt.Rows[0]["NicNo"].ToString();
            //        txt_CarNo.Text = dt.Rows[0]["CarNo"].ToString();
            //        cbo_CarName.Text = dt.Rows[0]["CarName"].ToString();
            //        cbo_CarManufacturer.Text = dt.Rows[0]["CarManufacturer"].ToString();
            //        txt_EngineNo.Text = dt.Rows[0]["EngineNo"].ToString();
            //        txt_ChasisNo.Text = dt.Rows[0]["ChasisNo"].ToString();
            //        txt_LicenseNo.Text = dt.Rows[0]["LicenseNo"].ToString();

            //        txt_Name.ReadOnly = true;
            //        txt_FatherName.ReadOnly = true;
            //        txt_NICNo.ReadOnly = true;
            //        txt_NICNo.ReadOnly = true;
            //        txt_CarNo.ReadOnly = true;
            //        txt_EngineNo.ReadOnly = true;
            //        txt_ChasisNo.ReadOnly = true;
            //        txt_LicenseNo.ReadOnly = true;

        }
コード例 #2
0
ファイル: BalanceDeduction.cs プロジェクト: Hadisaeed/FYP
        private void tb_RFID_TextChanged(object sender, EventArgs e)
        {
            if (tb_RFID.Text.Length < 8) return;
            BALCust_Registration objCustomer = new BALCust_Registration();
            objCustomer.CRUD = "Search";
            objCustomer.RFID = Convert.ToInt64(tb_RFID.Text);
            DataTable dt = new DataTable();
            dt = objCustomer.Cust_Registration(objCustomer);
            lbl_CurrAmount.Text = dt.Rows[0]["CurrentBalance"].ToString();
            if (dt != null && dt.Rows.Count > 0)
            {
                lbl_PrvsAmount.Text = dt.Rows[0]["CurrentBalance"].ToString();
                BALCust_Registration oBALCust_Registration = new BALCust_Registration();
                oBALCust_Registration.CRUD = "Update";
                oBALCust_Registration.RFID = Convert.ToInt64(tb_RFID.Text);
                oBALCust_Registration.CurrentBalance = Convert.ToInt32(dt.Rows[0]["CurrentBalance"]) - 20;
                lbl_CurrAmount.Text = Convert.ToString(Convert.ToInt32(dt.Rows[0]["CurrentBalance"]) - 20);
                DataTable dtUpdate = new DataTable();
                oBALCust_Registration.Cust_Registration(oBALCust_Registration);


                BALtblTransaction oBALtblTransaction = new BALtblTransaction();
                oBALtblTransaction.CRUD = "Insert";
                oBALtblTransaction.RefID = Convert.ToInt64(tb_RFID.Text);
                DataTable dtInsert = new DataTable();
                dtInsert = oBALtblTransaction.tblTransaction(oBALtblTransaction);
                if (dtInsert != null && dtInsert.Rows.Count > 0)
                {
                    MessageBox.Show("Verified");
                    tb_RFID.Text = "";
                }




               
            }

        }
コード例 #3
0
ファイル: RegistrationPage.cs プロジェクト: Hadisaeed/FYP
        private void txt_RegNo_TextChanged(object sender, EventArgs e)
        {
            if (txt_RegNo.Text.Length == 9)
            {
                BALCust_Registration SearchCustomer = new BALCust_Registration();
                SearchCustomer.CRUD = "Search";
                DataTable dt = new DataTable();
                dt = SearchCustomer.Cust_Registration(SearchCustomer);
                if (dt != null && dt.Rows.Count > 0)
                {
                    txt_Name.Text = dt.Rows[0]["Name"].ToString();
                    txt_FatherName.Text = dt.Rows[0]["FName"].ToString();
                    txt_NICNo.Text = dt.Rows[0]["NicNo"].ToString();
                    txt_CarNo.Text = dt.Rows[0]["CarNo"].ToString();
                    cbo_CarName.Text = dt.Rows[0]["CarName"].ToString();
                    cbo_CarManufacturer.Text = dt.Rows[0]["CarManufacturer"].ToString();
                    txt_EngineNo.Text = dt.Rows[0]["EngineNo"].ToString();
                    txt_ChasisNo.Text = dt.Rows[0]["ChasisNo"].ToString();
                    txt_LicenseNo.Text = dt.Rows[0]["LicenseNo"].ToString();

                    txt_Name.ReadOnly = true;
                    txt_FatherName.ReadOnly = true;
                    txt_NICNo.ReadOnly = true;
                    txt_NICNo.ReadOnly = true;
                    txt_CarNo.ReadOnly = true;
                    txt_EngineNo.ReadOnly = true;
                    txt_ChasisNo.ReadOnly = true;
                    txt_LicenseNo.ReadOnly = true;

                }

            }

            if (txt_RegNo.Text == null && txt_RFID1.Text.Length > 0)
            {
                
            }
        }
コード例 #4
0
ファイル: RegistrationPage.cs プロジェクト: Hadisaeed/FYP
        private void btn_Register_Click(object sender, EventArgs e)
        {
            try
            {
                BALCust_Registration NewCustomer = new BALCust_Registration();
                NewCustomer.CRUD = "Insert";
                NewCustomer.RFID = Convert.ToInt32(txt_RFID1.Text.Trim());
                NewCustomer.Name=txt_Name.Text.Trim();
                NewCustomer.FName = txt_FatherName.Text.Trim();
                NewCustomer.NicNo = Convert.ToInt32(txt_NICNo.Text.Trim());
                NewCustomer.CarNo = txt_CarNo.Text.Trim();
                NewCustomer.CarName = cbo_CarName.SelectedText;
                NewCustomer.CarManufacturer = txt_FatherName.Text.Trim();
                NewCustomer.EngineNo = txt_EngineNo.Text.Trim();
                NewCustomer.ChasisNo = txt_ChasisNo.Text.Trim();
                NewCustomer.LicenseNo = txt_LicenseNo.Text.Trim();

                DataTable dtInsert = new DataTable();
                dtInsert = NewCustomer.Cust_Registration(NewCustomer);
                    ////txt_Name.Text = Convert.ToInt32(["RFID"]);
                    //txt_FatherName.Text = dt.Rows[0]["FName"].ToString();
                    //txt_NICNo.Text = dt.Rows[0]["NicNo"].ToString();
                    //txt_CarNo.Text = dt.Rows[0]["CarNo"].ToString();
                    //cbo_CarName.Text = dt.Rows[0]["CarName"].ToString();
                    //cbo_CarManufacturer.Text = dt.Rows[0]["CarManufacturer"].ToString();
                    //txt_EngineNo.Text = dt.Rows[0]["EngineNo"].ToString();
                    //txt_ChasisNo.Text = dt.Rows[0]["ChasisNo"].ToString();
                    //txt_LicenseNo.Text = dt.Rows[0]["LicenseNo"].ToString();

                    //oBALInvSaleInvoiceDetail.ItemKey = Convert.ToInt32(dr["pk_intItemRecId"]);
                    //oBALInvSaleInvoiceDetail.Quantity = Convert.ToInt32(dr["intQty"]);
                    //oBALInvSaleInvoiceDetail.UnitPrice = Convert.ToDecimal(dr["decUnitPrice"]);
                    //oBALInvSaleInvoiceDetail.TotalPrice = Convert.ToDecimal(dr["decItemPrice"]);
                    //oBALInvSaleInvoiceDetail.InsertedBy = Convert.ToInt32(Session["UserRecId"].ToString());


            }
            catch (Exception eX)
            {
                MessageBox.Show(eX.Message);

            }
        }
コード例 #5
0
ファイル: TopUp.cs プロジェクト: Hadisaeed/FYP
 private void btn_TopUp_Click(object sender, EventArgs e)
 {
     BALCust_Registration UpdateBalance = new BALCust_Registration();
     UpdateBalance.CRUD = "UpdateBalance";
     UpdateBalance.RFID = RFID;
     UpdateBalance.CurrentBalance=Convert.ToInt32(UpdateAmount+ Convert.ToInt32(txt_TopUp.Text));
     DataTable dtInsert = new DataTable();
     dtInsert = UpdateBalance.Cust_Registration(UpdateBalance);
     if (dtInsert != null && dtInsert.Rows.Count > 0)
     {
         MessageBox.Show("Balance Updated");
         
     }
 }
コード例 #6
0
ファイル: RegistrationPage.cs プロジェクト: Hadisaeed/FYP
        private void btn_Register_Click(object sender, EventArgs e)
        {
            try
            {
                BALCust_Registration NewCustomer = new BALCust_Registration();
                NewCustomer.CRUD = "Insert";
                NewCustomer.RFID = Convert.ToInt32(txt_RFID1.Text.Trim());
                NewCustomer.Name=txt_Name.Text.Trim();
                NewCustomer.FName = txt_FatherName.Text.Trim();
                NewCustomer.NicNo = Convert.ToInt32(txt_NICNo.Text.Trim());
                NewCustomer.CarNo = txt_CarNo.Text.Trim();
                NewCustomer.CarName = cbo_CarName.SelectedText;
                NewCustomer.CarManufacturer = txt_FatherName.Text.Trim();
                NewCustomer.EngineNo = txt_EngineNo.Text.Trim();
                NewCustomer.ChasisNo = txt_ChasisNo.Text.Trim();
                NewCustomer.LicenseNo = txt_LicenseNo.Text.Trim();

                DataTable dtInsert = new DataTable();
                dtInsert = NewCustomer.Cust_Registration(NewCustomer);
                this.Hide();
                MessageBox.Show("Successfully Registered");
                form_AdminSession AdminHome = new form_AdminSession();
                AdminHome.ShowDialog();
                this.Close();

                
                
                    ////txt_Name.Text = Convert.ToInt32(["RFID"]);
                    //txt_FatherName.Text = dt.Rows[0]["FName"].ToString();
                    //txt_NICNo.Text = dt.Rows[0]["NicNo"].ToString();
                    //txt_CarNo.Text = dt.Rows[0]["CarNo"].ToString();
                    //cbo_CarName.Text = dt.Rows[0]["CarName"].ToString();
                    //cbo_CarManufacturer.Text = dt.Rows[0]["CarManufacturer"].ToString();
                    //txt_EngineNo.Text = dt.Rows[0]["EngineNo"].ToString();
                    //txt_ChasisNo.Text = dt.Rows[0]["ChasisNo"].ToString();
                    //txt_LicenseNo.Text = dt.Rows[0]["LicenseNo"].ToString();



            }
            catch (Exception eX)
            {
                MessageBox.Show(eX.Message);

            }
        }