Ejemplo n.º 1
0
        /// <summary>
        /// GET STUDENTS LIST
        /// </summary>
        /// <param name="aStudent"></param>
        /// <returns></returns>

        public List <ModelStudent> GetStudentList()
        {
            List <ModelStudent> lstModelStudent = new List <ModelStudent>();
            DataTable           tblStudentList  = new DataTable();

            tblStudentList = DALCommon.GetDataByQuery("[sp_GetStudentRocordList]");
            if (tblStudentList.Rows.Count > 0)
            {
                foreach (DataRow aStudent in tblStudentList.Rows)
                {
                    ModelStudent objModelStudent = new ModelStudent();
                    objModelStudent.StudentId    = Convert.ToInt32(aStudent["StudentId"]);
                    objModelStudent.ComputerCode = Convert.ToInt32(aStudent["ComputerCode"]);
                    objModelStudent.RegNo        = Convert.ToInt32(aStudent["RegNo"]);
                    objModelStudent.StudentName  = Convert.ToString(aStudent["StudentName"]);
                    objModelStudent.FatherName   = Convert.ToString(aStudent["FatherName"]);
                    objModelStudent.MonthlyFee   = Convert.ToInt32(aStudent["MonthlyFee"]);
                    //objModelStudent.Sex = Convert.ToInt32(aStudent["Gender"]);
                    objModelStudent.DateOfBirth                = Convert.ToDateTime(aStudent["DateOfBirth"]);
                    objModelStudent.StudentClass.ClassName     = Convert.ToString(aStudent["ClassName"]);
                    objModelStudent.StudentSection.SectionName = Convert.ToString(aStudent["SectionName"]);
                    objModelStudent.StatusText      = Convert.ToString(aStudent["StatusText"]);
                    objModelStudent.Status          = Convert.ToInt32(aStudent["Status"]);
                    objModelStudent.DateOfAdmission = Convert.ToDateTime(aStudent["DateOfAdmission"]);

                    lstModelStudent.Add(objModelStudent);
                }
            }
            return(lstModelStudent);
        }
Ejemplo n.º 2
0
    protected void btnLogin_Click(object sender, EventArgs e)
    {
        try
        {
            //, txtPassword.Text
            DALCommon ojbDALLogin = new DALCommon();
            DataSet   ds          = ojbDALLogin.UserLogIn(txtuserId.Text);
            if (ds.Tables[0].Rows.Count > 0)
            {
                string password = objDOUty.Decrypts(ds.Tables[0].Rows[0]["emp_pwd"].ToString(), true);
                if (txtPassword.Text == password)
                {
                    Session["userid"]      = ds.Tables[0].Rows[0]["emp_id"].ToString();
                    Session["firstname"]   = ds.Tables[0].Rows[0]["emp_firstname"].ToString();
                    Session["lastname"]    = ds.Tables[0].Rows[0]["emp_lastname"].ToString();
                    Session["designation"] = ds.Tables[0].Rows[0]["Designation"].ToString();
                    Session["RoleId"]      = ds.Tables[0].Rows[0]["RoleId"].ToString();
                    Session["Email"]       = ds.Tables[0].Rows[0]["emp_email"].ToString();
                    //Server.Execute("/admin/index.aspx");

                    Response.Redirect("/admin/index.aspx", false);
                }

                else
                {
                    ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "message alert", "alert('Invalid User Credentials !!');", true);
                }
            }
        }
        catch (Exception ex)
        {
            Response.Redirect("login.aspx", false);
        }
    }
Ejemplo n.º 3
0
        //
        public List <SelectListItem> GetFeeMonthDropdown(decimal SchoolAccountId)
        {
            List <SelectListItem> lstMonth = new List <SelectListItem>();

            lstMonth.Add(new SelectListItem {
                Text = "--- Select Month --- ", Value = "0"
            });

            DataTable tblClassList = new DataTable();

            SqlParameter[] param = new SqlParameter[1];

            param[0] = new SqlParameter("@SchoolAccountId", SchoolAccountId);

            tblClassList = DALCommon.GetDataUsingDataTable("[sp_GetAllFeeMonth]", param);
            if (tblClassList.Rows.Count > 0)
            {
                foreach (DataRow aClass in tblClassList.Rows)
                {
                    lstMonth.Add(new SelectListItem {
                        Text = Convert.ToString(aClass["FeeMonth"]), Value = Convert.ToString(aClass["FeeMonthId"])
                    });
                }
            }
            return(lstMonth);
        }
Ejemplo n.º 4
0
        private void btnImportData_Click(object sender, EventArgs e)
        {
            OpenFileDialog fileDialog = new OpenFileDialog();

            fileDialog.Multiselect = false;
            fileDialog.Title       = "Please select file";
            fileDialog.Filter      = "Images|*.xls;*.xlsx";

            string strExcelFilePath = "";

            if (fileDialog.ShowDialog() == DialogResult.OK)
            {
                strExcelFilePath = fileDialog.FileName;
            }

            if (!string.IsNullOrEmpty(strExcelFilePath))
            {
                MessageBox.Show(DALCommon.ImportCust(strExcelFilePath, "Sheet1")
                    ? "Data import is successful!"
                    : "Data import failed!");
            }

            new OnLoadSystemCommonData().GetTACust();
            dgvCust.DataSource = CommonData.TaCustList;
        }
Ejemplo n.º 5
0
        public List <ModelStudent> GetStudentList(string SearchCriteria, decimal SchoolAccountId)
        {
            List <ModelStudent> lstModelStudent = new List <ModelStudent>();
            DataTable           tblStudentList  = new DataTable();

            SqlParameter[] param = new SqlParameter[2];

            param[0] = new SqlParameter("@SearchCriteria", String.IsNullOrEmpty(SearchCriteria) ? "" : SearchCriteria);
            param[1] = new SqlParameter("@SchoolAccountId", SchoolAccountId);

            tblStudentList = DALCommon.GetDataUsingDataTable("[sp_Admin_GetStudentListBySchoolId]", param);
            if (tblStudentList.Rows.Count > 0)
            {
                foreach (DataRow aStudent in tblStudentList.Rows)
                {
                    ModelStudent objModelStudent = new ModelStudent();
                    objModelStudent.StudentId                  = Convert.ToInt32(aStudent["StudentId"]);
                    objModelStudent.ComputerCode               = Convert.ToInt32(aStudent["ComputerCode"]);
                    objModelStudent.RegNo                      = Convert.ToInt32(aStudent["RegNo"]);
                    objModelStudent.StudentName                = Convert.ToString(aStudent["StudentName"]);
                    objModelStudent.FatherName                 = Convert.ToString(aStudent["FatherName"]);
                    objModelStudent.MonthlyFee                 = Convert.ToInt32(aStudent["MonthlyFee"]);
                    objModelStudent.Sex                        = Convert.ToInt32(aStudent["Gender"]);
                    objModelStudent.DateOfBirth                = Convert.ToDateTime(aStudent["DateOfBirth"]);
                    objModelStudent.Status                     = Convert.ToInt32(aStudent["Status"]);
                    objModelStudent.StatusText                 = Convert.ToString(aStudent["StatusText"]);
                    objModelStudent.StudentClass.ClassName     = Convert.ToString(aStudent["ClassName"]);
                    objModelStudent.StudentSection.SectionName = Convert.ToString(aStudent["SectionName"]);
                    lstModelStudent.Add(objModelStudent);
                }
            }
            return(lstModelStudent);
        }
Ejemplo n.º 6
0
        public DataTable GetFeedUrls(int?FeedTypeId)
        {
            SqlParameter[] param = new SqlParameter[1];

            param[0] = new SqlParameter("@FeedTypeId", FeedTypeId);
            return(DALCommon.GetDataUsingDataTable("sp_Admin_GetFeedUrlWithScrepeSetting", param));
        }
Ejemplo n.º 7
0
        //
        public List <SelectListItem> GetReportListDropdown(double SchoolAccountId, int ReportCategory)
        {
            List <SelectListItem> lstReports = new List <SelectListItem>();

            lstReports.Add(new SelectListItem {
                Text = "--- Select Report Type --- ", Value = "0"
            });

            DataTable tblReportsList = new DataTable();

            SqlParameter[] param = new SqlParameter[2];

            param[0] = new SqlParameter("@SchoolAccountId", SchoolAccountId);
            param[1] = new SqlParameter("@ReportCategory", ReportCategory);

            tblReportsList = DALCommon.GetDataUsingDataTable("[sp_GetReportInfoBySchoolId]", param);
            if (tblReportsList.Rows.Count > 0)
            {
                foreach (DataRow aClass in tblReportsList.Rows)
                {
                    lstReports.Add(new SelectListItem {
                        Text = Convert.ToString(aClass["ReportName"]), Value = Convert.ToString(aClass["ReportId"])
                    });
                }
            }
            return(lstReports);
        }
Ejemplo n.º 8
0
        public List <ModelFeed> GetFeedDataList(int page = 0)
        {
            List <ModelFeed> ModelFeedList = new List <ModelFeed>();
            DataTable        dt            = new DataTable();

            SqlParameter[] param = new SqlParameter[1];


            param[0] = new SqlParameter("@FeedId", page);
            dt       = DALCommon.GetDataUsingDataTable("[sp_Admin_GetFeedList]", param);


            if (dt.Rows.Count > 0)
            {
                foreach (DataRow item in dt.Rows)
                {
                    ModelFeed objModelFeed = new ModelFeed();
                    objModelFeed.FeedId          = Convert.ToDouble(item["FeedId"]);
                    objModelFeed.FeedChannelName = Convert.ToString(item["FeedChannelName"]);
                    objModelFeed.FeedCategory    = Convert.ToString(item["FeedCategory"]);
                    objModelFeed.FeedTitlePath   = Convert.ToString(item["FeedTitlePath"]);
                    objModelFeed.FeedImagePath   = Convert.ToString(item["FeedImagePath"]);
                    objModelFeed.FeedAddedDate   = Convert.ToDateTime(item["FeedAddedDate"]);
                    ModelFeedList.Add(objModelFeed);
                }
            }
            return(ModelFeedList);
        }
Ejemplo n.º 9
0
        public List <SelectListItem> GetClassSectionDropdown(decimal SchoolAccountId)
        {
            List <SelectListItem> lstClassSection = new List <SelectListItem>();

            lstClassSection.Add(new SelectListItem {
                Text = "--- Select Class Section--- ", Value = "0"
            });

            DataTable tblClassList = new DataTable();

            SqlParameter[] param = new SqlParameter[1];

            param[0] = new SqlParameter("@SchoolAccountId", SchoolAccountId);

            tblClassList = DALCommon.GetDataUsingDataTable("[sp_Admin_GetClassSectionDropdownListBySchoolId]", param);
            if (tblClassList.Rows.Count > 0)
            {
                foreach (DataRow aClass in tblClassList.Rows)
                {
                    lstClassSection.Add(new SelectListItem {
                        Text = Convert.ToString(aClass["SectionName"]), Value = Convert.ToString(aClass["SectionId"])
                    });
                }
            }
            return(lstClassSection);
        }
Ejemplo n.º 10
0
        public DataTable getFeeMonthsByYearDP()
        {
            DataTable adataSetTable = new DataTable();

            adataSetTable = DALCommon.GetDataByStoredProcedure("[sp_Admin_GetFeeMothByYear]");
            return(adataSetTable);
        }
Ejemplo n.º 11
0
        public ModelStudentFee GetStudentSinngleFeeInfoByFeeId(double FeeId)
        {
            ModelStudentFee objModelStudentFee = new ModelStudentFee();
            DataTable       tblStudentFeeInfo  = new DataTable();

            SqlParameter[] param = new SqlParameter[1];

            param[0]          = new SqlParameter("@FeeId", FeeId);
            tblStudentFeeInfo = DALCommon.GetDataUsingDataTable("[sp_Admin_GetStudentSinngleFeeInfoByFeeId]", param);

            if (tblStudentFeeInfo.Rows.Count > 0)
            {
                objModelStudentFee.FeeId           = Convert.ToDouble(tblStudentFeeInfo.Rows[0]["FeeId"]);
                objModelStudentFee.StudentId       = Convert.ToInt32(tblStudentFeeInfo.Rows[0]["StudentId"]);
                objModelStudentFee.ComputerCode    = Convert.ToInt32(tblStudentFeeInfo.Rows[0]["ComputerCode"]);
                objModelStudentFee.SerialNo        = Convert.ToInt32(tblStudentFeeInfo.Rows[0]["SerialNo"]);
                objModelStudentFee.AdmissionFee    = DALUtility.isNumericDBNULL(tblStudentFeeInfo.Rows[0]["AdmissionFee"].ToString());
                objModelStudentFee.Admission       = DALUtility.isNumericDBNULL(tblStudentFeeInfo.Rows[0]["Admission"].ToString());
                objModelStudentFee.ReAdmissionFee  = DALUtility.isNumericDBNULL(tblStudentFeeInfo.Rows[0]["ReAdmissionFee"].ToString());
                objModelStudentFee.RegistrationFee = DALUtility.isNumericDBNULL(tblStudentFeeInfo.Rows[0]["RegistrationFee"].ToString());
                objModelStudentFee.MonthlyFee      = DALUtility.isNumericDBNULL(tblStudentFeeInfo.Rows[0]["MonthlyFee"].ToString());
                objModelStudentFee.ComputerFee     = DALUtility.isNumericDBNULL(tblStudentFeeInfo.Rows[0]["ComputerFee"].ToString());
                objModelStudentFee.Fine            = DALUtility.isNumericDBNULL(tblStudentFeeInfo.Rows[0]["Fine"].ToString());
                objModelStudentFee.ExamFee         = DALUtility.isNumericDBNULL(tblStudentFeeInfo.Rows[0]["ExamFee"].ToString());
                objModelStudentFee.GeneratorFee    = DALUtility.isNumericDBNULL(tblStudentFeeInfo.Rows[0]["GeneratorFee"].ToString());
                objModelStudentFee.FeeMonth        = Convert.ToString(tblStudentFeeInfo.Rows[0]["FeeMonth"]);
                objModelStudentFee.Total           = DALUtility.isNumericDBNULL(tblStudentFeeInfo.Rows[0]["Total"].ToString());
                objModelStudentFee.FeePaidStatus   = Convert.ToInt32(tblStudentFeeInfo.Rows[0]["FeePaidStatus"].ToString());
            }
            return(objModelStudentFee);
        }
Ejemplo n.º 12
0
        public decimal RegisterNewMerchantUser(ModelMerchantUser objModelMerchantUser)
        {
            decimal result            = 0;
            string  getActivationCode = DALUtility.GetEmailActivationCode();

            SqlParameter[] param = new SqlParameter[8];

            param[0] = new SqlParameter("@MerchantNameEN", objModelMerchantUser.MerchantNameEN);
            param[1] = new SqlParameter("@MerchantEmail", objModelMerchantUser.MerchantEmail);
            param[2] = new SqlParameter("@MerchantPassword", EncryptDecrypt.Encrypt(objModelMerchantUser.MerchantPassword));
            param[3] = new SqlParameter("@strAdminUserMobile", objModelMerchantUser.MerchantMobileNumber);
            param[4] = new SqlParameter("@CompanyNameEN", objModelMerchantUser.CompanyNameEN);
            param[5] = new SqlParameter("@sCompanyLogo", objModelMerchantUser.CompanyLogo);
            param[6] = new SqlParameter("@AccountStatus", 1);
            param[7] = new SqlParameter("@ActivationCodeByEmail", getActivationCode);

            result = DALCommon.ExecuteNonQueryReturnIdentity("[sp_Admin_InsertMerchantUser]", param);
            if (result > 0)
            {
                string MerchantKey         = EncryptDecrypt.Encrypt(DALUtility.GetEmailActivationCode());
                string MerchantReferenceID = EncryptDecrypt.GenerateHashCode(result + MerchantKey + System.DateTime.Now);
                if (UpdateMercharAPIKeys(result, MerchantKey, MerchantReferenceID) > 0)
                {
                    SendActivationCode(getActivationCode, objModelMerchantUser.MerchantEmail);
                }
            }
            return(result);
        }
Ejemplo n.º 13
0
        protected void CreateUserWizard1_SendingMail(object sender, MailMessageEventArgs e)
        {
            try
            {
                MembershipUser newUserAccount   = Membership.GetUser(RegisterUser.UserName);
                Guid           newUserAccountId = (Guid)newUserAccount.ProviderUserKey;
                string         domainName       = Request.Url.GetLeftPart(UriPartial.Authority) + Request.ApplicationPath;
                string         confirmationPage = "EmailConfirmation.aspx?ID=" + newUserAccountId.ToString();
                string         url  = domainName + confirmationPage;
                string         Name = ((TextBox)RegisterUserWizardStep.ContentTemplateContainer.FindControl("Name")).Text;
                e.Message.Body = e.Message.Body.Replace("<%VerificationUrl%>", url);
                e.Message.Body = e.Message.Body.Replace("<%Name%>", Name);

                DALCommon cmn = new DALCommon();
                cmn.SendHtmlFormattedEmail(RegisterUser.Email, "Verification Code", e.Message.Body);

                Session["mailtxt"] = e.Message.Body.ToString();
                Session["email"]   = RegisterUser.Email;
                Page.ClientScript.RegisterStartupScript(GetType(), "Message", "<SCRIPT LANGUAGE='javascript'>javascript:   document.getElementById('ahrfcreate').click();</script>");
                RegisterUser.CompleteSuccessText = "An email has been sent to your account. Please view the email and confirm your account to complete the registration process.";
                e.Cancel = true;
            }
            catch (Exception ex)
            {
            }
        }
Ejemplo n.º 14
0
        private void GetChartPermission()
        {
            pnlSales.Visible       = cSales.Visible = lblSalesWidth.Visible = pnlReceipt.Visible = cReceipt.Visible = lblReceiptWidth.Visible =
                pnlPayment.Visible = cPayment.Visible = lblPaymentWidth.Visible = pnlPurchase.Visible = cPurchase.Visible = lblPurchaseWidth.Visible = false;
            DataTable datMaster = new DALCommon().GetReferenceTable("FormName,SEL", "FormID", "MenuPermission", "");

            if (datMaster != null && datMaster.Rows.Count > 0)
            {
                pnlSales.Visible = cSales.Visible = lblSalesWidth.Visible = datMaster.AsEnumerable().Where(t => t["FormID"].ToInt32() == (int)clsCommonItems.Forms.Sale).Select(t => Convert.ToBoolean(t["SEL"])).FirstOrDefault() == true;

                if (!pnlSales.Visible)
                {
                    pnlSales.Visible = cSales.Visible = lblSalesWidth.Visible = datMaster.AsEnumerable().Where(t => t["FormID"].ToInt32() == (int)clsCommonItems.Forms.Sale2).Select(t => Convert.ToBoolean(t["SEL"])).FirstOrDefault() == true;
                }

                pnlReceipt.Visible = cReceipt.Visible = lblReceiptWidth.Visible = pnlPayment.Visible = cPayment.Visible = lblPaymentWidth.Visible =
                    datMaster.AsEnumerable().Where(t => t["FormID"].ToInt32() == (int)clsCommonItems.Forms.CrossEntry).Select(t => Convert.ToBoolean(t["SEL"])).FirstOrDefault() == true;

                if (!pnlReceipt.Visible)
                {
                    pnlReceipt.Visible = cReceipt.Visible = lblReceiptWidth.Visible = pnlPayment.Visible = cPayment.Visible = lblPaymentWidth.Visible =
                        datMaster.AsEnumerable().Where(t => t["FormID"].ToInt32() == (int)clsCommonItems.Forms.Sale2).Select(t => Convert.ToBoolean(t["SEL"])).FirstOrDefault() == true;
                }

                pnlPurchase.Visible = cPurchase.Visible = lblPurchaseWidth.Visible = datMaster.AsEnumerable().Where(t => t["FormID"].ToInt32() == (int)clsCommonItems.Forms.Purchase).Select(t => Convert.ToBoolean(t["SEL"])).FirstOrDefault() == true;

                if (!pnlPurchase.Visible)
                {
                    pnlPurchase.Visible = cPurchase.Visible = lblPurchaseWidth.Visible = datMaster.AsEnumerable().Where(t => t["FormID"].ToInt32() == (int)clsCommonItems.Forms.Purchase2).Select(t => Convert.ToBoolean(t["SEL"])).FirstOrDefault() == true;
                }
            }

            pnlFilter.Visible = pnlTile.Visible = (pnlSales.Visible || pnlReceipt.Visible || pnlPayment.Visible || pnlPurchase.Visible);
        }
        public List <Questionmaster> startexam(int Qzmid)
        {
            DALCommon             dal         = new DALCommon(ConStr);
            List <Questionmaster> Queslst     = new List <Questionmaster>();
            DataTable             _dtquestion = new DataTable();

            _dtquestion = dal.GetQuizequestionList(Qzmid);
            DataTable _dtquestionoption = new DataTable();

            for (int i = 0; i < _dtquestion.Rows.Count; i++)
            {
                Questionmaster _singlequest = new Questionmaster();
                _singlequest.Qmid     = Convert.ToInt32(_dtquestion.Rows[i]["Qmid"]);
                _singlequest.Question = Convert.ToString(_dtquestion.Rows[i]["Question"]);
                _dtquestionoption     = dal.GetQuestionoptionList(_singlequest.Qmid);
                List <Questionoptions> _optionlst = new List <Questionoptions>();

                for (int k = 0; k < _dtquestionoption.Rows.Count; k++)
                {
                    Questionoptions _optionsingle = new Questionoptions();
                    _optionsingle.Opmid      = Convert.ToInt32(_dtquestionoption.Rows[k]["Opmid"]);
                    _optionsingle.Optiontext = Convert.ToString(_dtquestionoption.Rows[k]["Optiontext"]);
                    _optionlst.Add(_optionsingle);
                }
                _singlequest.Optionlist = _optionlst;
                Queslst.Add(_singlequest);
            }
            return(Queslst);
        }
Ejemplo n.º 16
0
        public List <ModelTransactionByCreditCard> GetPaymeantTransactionHistory(decimal MerchantAccountNo)
        {
            List <ModelTransactionByCreditCard> lstModelTransactionByCreditCard = new List <ModelTransactionByCreditCard>();
            DataTable tblMerchantTransactionHistory = new DataTable();

            SqlParameter[] param = new SqlParameter[1];

            param[0] = new SqlParameter("@MerchantAccountNo", MerchantAccountNo);

            tblMerchantTransactionHistory = DALCommon.GetDataUsingDataTable("[sp_Admin_GetMerchantTransactionHistory]", param);
            if (tblMerchantTransactionHistory.Rows.Count > 0)
            {
                foreach (DataRow aTransaction in tblMerchantTransactionHistory.Rows)
                {
                    ModelTransactionByCreditCard objModelTransactionByCreditCard = new ModelTransactionByCreditCard();
                    objModelTransactionByCreditCard.TransactionID      = Convert.ToInt32(aTransaction["TransactionID"]);
                    objModelTransactionByCreditCard.UserID             = aTransaction["UserID"].ToString();
                    objModelTransactionByCreditCard.ProductID          = aTransaction["ProductID"].ToString();
                    objModelTransactionByCreditCard.Amount             = Convert.ToDecimal(aTransaction["Amount"]);
                    objModelTransactionByCreditCard.Currency           = Convert.ToString(aTransaction["Currency"]);
                    objModelTransactionByCreditCard.Language           = Convert.ToString(aTransaction["Language"]);
                    objModelTransactionByCreditCard.TransactionDetails = Convert.ToString(aTransaction["TransactionDetails"]);
                    objModelTransactionByCreditCard.TransactionDate    = Convert.ToDateTime(aTransaction["TransactionDate"]);
                    objModelTransactionByCreditCard.Status             = Convert.ToInt32(aTransaction["Status"]);
                    objModelTransactionByCreditCard.StatusText         = Convert.ToString(aTransaction["StatusText"]);
                    objModelTransactionByCreditCard.PaymentType        = Convert.ToString(aTransaction["PaymentType"]);
                    lstModelTransactionByCreditCard.Add(objModelTransactionByCreditCard);
                }
            }
            return(lstModelTransactionByCreditCard);
        }
Ejemplo n.º 17
0
        public static ModelEmailTemplate GetEmailTemplates(string TemplateName)
        {
            DataTable          dtEmails = default(DataTable);
            ModelEmailTemplate objModelEmailTemplate = new ModelEmailTemplate();

            SqlParameter[] param = new SqlParameter[1];
            param[0] = new SqlParameter("@EmailTemplate", TemplateName);
            dtEmails = DALCommon.GetDataUsingDataTable("[sp_Task_GetEmailTemplates]", param);

            if (dtEmails.Rows.Count > 0)
            {
                var _with1 = objModelEmailTemplate;
                _with1.EmailEN        = dtEmails.Rows[0]["EmailEN"].ToString();
                _with1.EmailAR        = dtEmails.Rows[0]["EmailAR"].ToString();
                _with1.EmailTextEN    = dtEmails.Rows[0]["EmailTextEN"].ToString();
                _with1.EmailTextAR    = dtEmails.Rows[0]["EmailTextAR"].ToString();
                _with1.EmailSubjectAR = dtEmails.Rows[0]["EmailSubjectAR"].ToString();
                _with1.EmailSubjectEN = dtEmails.Rows[0]["EmailSubjectEN"].ToString();
                _with1.EmailSMTP      = dtEmails.Rows[0]["EmailSMTP"].ToString();
                _with1.EmailSender    = dtEmails.Rows[0]["EmailSender"].ToString();
                _with1.EmailUserName  = dtEmails.Rows[0]["EmailUserName"].ToString();
                _with1.Emailpassword  = dtEmails.Rows[0]["Emailpassword"].ToString();
            }

            return(objModelEmailTemplate);
        }
Ejemplo n.º 18
0
        public decimal InsertStudentMonthlyAdvanceFeeByStudentId(decimal StudentId, int Feemonth, int AdmissionFee, int ReAdmissionFee,
                                                                 int RegistrationFee, int ComputerFee, int Fine, int ExamFee, int GenatorFee, string FeeDate, int SchoolAccountId)
        {
            try
            {
                SqlParameter[] paramStudentFee = new SqlParameter[11];
                paramStudentFee[0] = new SqlParameter("@StudentId", Convert.ToDecimal(StudentId));
                paramStudentFee[1] = new SqlParameter("@FeeMonth", Feemonth);
                paramStudentFee[2] = new SqlParameter("@AdmissionFee", AdmissionFee);

                paramStudentFee[3]  = new SqlParameter("@ReAdmissionFee", ReAdmissionFee);
                paramStudentFee[4]  = new SqlParameter("@RegistrationFee", RegistrationFee);
                paramStudentFee[5]  = new SqlParameter("@ComputerFee", ComputerFee);
                paramStudentFee[6]  = new SqlParameter("@Fine", Fine);
                paramStudentFee[7]  = new SqlParameter("@ExamFee", ExamFee);
                paramStudentFee[8]  = new SqlParameter("@GeneratorFee", GenatorFee);
                paramStudentFee[9]  = new SqlParameter("@FeeDate", Convert.ToString(FeeDate));
                paramStudentFee[10] = new SqlParameter("@SchoolAccountId", SchoolAccountId);
                return(DALCommon.ExecuteNonQueryReturnIdentity("[sp_Admin_InsertStudentMonthlyFeeByStudentId]", paramStudentFee));
            }
            catch (Exception)
            {
                throw;
            }
        }
Ejemplo n.º 19
0
        private void FrmSaleManage_FormClosing(object sender, FormClosingEventArgs e)
        {
            DialogResult result = MessageBox.Show("确定要退出吗?", "退出询问", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

            if (result != DialogResult.Yes)
            {
                e.Cancel = true;
            }
            else
            {
                try
                {
                    DateTime exitTime = DALCommon.GetServerTime();
                    int      count    = objLogService.WriteExitLog(Program.currentSalesPerson.LogId, exitTime);
                    if (count == 1)
                    {
                        e.Cancel = false;
                    }
                    else
                    {
                        MessageBox.Show("更新退出时间失败,请检查是否非法登录");
                        e.Cancel = true;
                    }
                }
                catch (Exception ex)
                {
                    MessageBox.Show("退出时出现异常,请重试:" + ex.Message);
                    e.Cancel = true;
                }
            }
        }
Ejemplo n.º 20
0
        public DataTable GetAdminUserDetailsByUserNo(double AdminUserNo)
        {
            SqlParameter[] param = new SqlParameter[1];
            param[0] = new SqlParameter("@AdminUserNo", AdminUserNo);

            return(DALCommon.GetDataUsingDataTable("[sp_Admin_GetAdminDetailsByAdminUserNo]", param));
        }
Ejemplo n.º 21
0
        public DataTable GetAdminUserDetailsByEmail(string AdminEmail)
        {
            SqlParameter[] param = new SqlParameter[1];
            param[0] = new SqlParameter("@Email", AdminEmail);

            return(DALCommon.GetDataUsingDataTable("sp_Admin_GetAdminUserByEmail", param));
        }
Ejemplo n.º 22
0
        public List <ModelLeftMenu> LeftMenu()
        {
            DataTable dt = new DataTable();

            dt = DALCommon.GetDataByStoredProcedure("[sp_Admin_GetLeftMenu]");

            List <ModelLeftMenu> LeftMenu       = new List <ModelLeftMenu>();
            List <ModelLeftMenu> LeftMenuReturn = new List <ModelLeftMenu>();

            if (dt.Rows.Count > 0)
            {
                foreach (DataRow item in dt.Rows)
                {
                    ModelLeftMenu objModelLeftMenu = new ModelLeftMenu();
                    objModelLeftMenu.Id       = Convert.ToInt32(item["intMenuId"]);
                    objModelLeftMenu.MenuText = Convert.ToString(item["strMenuTitleEn"]);
                    objModelLeftMenu.URL      = Convert.ToString(item["strAdminPageURL"]);
                    objModelLeftMenu.CssClass = Convert.ToString(item["strCssClass"]);
                    objModelLeftMenu.ParentId = item["intParentId"] != DBNull.Value ? Convert.ToInt32(item["intParentId"]) : (int?)null;
                    objModelLeftMenu.IsActive = Convert.ToBoolean(item["bllIsActive"]);
                    LeftMenu.Add(objModelLeftMenu);
                }
                LeftMenuReturn = GetMenuTree(LeftMenu, null);
            }
            return(LeftMenuReturn);
        }
Ejemplo n.º 23
0
        public List <ModelAdminPage> GetAdminPagesList(int page = 0)
        {
            List <ModelAdminPage> ModelAdminPageList = new List <ModelAdminPage>();
            DataTable             dt = new DataTable();

            dt = DALCommon.GetDataByStoredProcedure("sp_Admin_GetAdminPages");


            if (dt.Rows.Count > 0)
            {
                foreach (DataRow item in dt.Rows)
                {
                    ModelAdminPage objModelAdminPage = new ModelAdminPage();
                    objModelAdminPage.AdminPageID     = Convert.ToDouble(item["AdminPageID"]);
                    objModelAdminPage.AdminPageNameEn = Convert.ToString(item["AdminPageNameEn"]);
                    objModelAdminPage.AdminPageNameAr = Convert.ToString(item["AdminPageNameAr"]);
                    objModelAdminPage.AdminPageURL    = Convert.ToString(item["AdminPageURL"]);
                    objModelAdminPage.IsActive        = Convert.ToBoolean(item["IsActive"]);
                    //objModelAdminPage.IsShowInMenu = Convert.ToBoolean(item["AddedDate"]);
                    objModelAdminPage.AdminPageAddedBy = Convert.ToDouble(item["AdminPageAddedBy"]);
                    objModelAdminPage.AddedDate        = Convert.ToDateTime(item["AddedDate"]);
                    ModelAdminPageList.Add(objModelAdminPage);
                }
            }
            return(ModelAdminPageList);
        }
Ejemplo n.º 24
0
        /// <summary>
        /// 创建流水号(可能会出现异常),调用时需处理
        /// </summary>
        /// <returns></returns>
        private string CreateSerialNum()
        {
            string serialNum = DALCommon.GetServerTime().ToString("yyyyMMddHHmmssfff");
            Random random    = new Random();

            serialNum += random.Next(10, 100).ToString();
            return(serialNum);
        }
 protected void btnresend_Click(object sender, EventArgs e)
 {
     if (Session["mailtxt"] != null)
     {
         DALCommon cmn = new DALCommon();
         cmn.SendHtmlFormattedEmail(Session["email"].ToString(), "Verification Code", Session["mailtxt"].ToString());
     }
 }
Ejemplo n.º 26
0
        public int UpdateAdminPassword(double AdminUserNo, string Password)
        {
            SqlParameter[] param = new SqlParameter[2];
            param[0] = new SqlParameter("@AdminUserNo", AdminUserNo);
            param[1] = new SqlParameter("@AdminUserPassword", Password);

            return(DALCommon.ExecuteNonQuery("[sp_Admin_UpdateAdminUserPassword]", param));
        }
Ejemplo n.º 27
0
        public DataTable GetMerchantAPIKey(decimal MerchantAccountNo)
        {
            SqlParameter[] param = new SqlParameter[1];

            param[0] = new SqlParameter("@MerchantAccountNo", MerchantAccountNo);

            return(DALCommon.GetDataUsingDataTable("[sp_Admin_GetMerchantAPIKey]", param));
        }
Ejemplo n.º 28
0
        //UpdateMerchantServiceStatus

        public decimal UpdateMerchantServiceStatus(decimal MerchantAccountNo, int ServiceId)
        {
            SqlParameter[] param = new SqlParameter[2];

            param[0] = new SqlParameter("@MerchantAccountNo", MerchantAccountNo);
            param[1] = new SqlParameter("@PaymentServiceTypeID", ServiceId);

            return(DALCommon.ExecuteNonQueryReturnIdentity("[sp_Admin_UpdateMerchantServiceStatus]", param));
        }
Ejemplo n.º 29
0
        public DataTable GetSchoolUserDetailsByLogin(string strSchoolAccountId, string strUserEmail, string strUserPassword)
        {
            SqlParameter[] param = new SqlParameter[3];

            param[0] = new SqlParameter("@SchoolAccountId", strSchoolAccountId);
            param[1] = new SqlParameter("@UserEmail", strUserEmail);
            param[2] = new SqlParameter("@UserPassword", EncryptDecrypt.Encrypt(strUserPassword));
            return(DALCommon.GetDataUsingDataTable("[sp_Admin_CheckUserAccountLogin]", param));
        }
Ejemplo n.º 30
0
        public DataTable MerchantPasswordRecovery(string MerchantEmail, string PasswordKey)
        {
            SqlParameter[] param = new SqlParameter[2];

            param[0] = new SqlParameter("@MerchantEmail", MerchantEmail);
            param[1] = new SqlParameter("@PasswordRecoveryKey", PasswordKey);

            return(DALCommon.GetDataUsingDataTable("[sp_Admin_GetMerchantByPasswordKey]", param));
        }