void ImportFromExcel_OnImportDataCompelete(System.Data.DataSet _ds)
        {
            var projes = new Model.ZirProje();
            var msg    = projes.ImportFromExcel(_ds, uscRoleSelect.RoleId, uscRoleSelect.UserId);

            ImportFromExcel.Message = msg;
        }
        public Dictionary <string, string> DataBound(string projectCodes)
        {
            var projes = new Model.ZirProje();
            var role   = AccessManagementService.Access.AccessControl.LoggedInUser.Roles.FirstOrDefault();

            if (role != null)
            {
                uscFileUplaod.RoleId = role.ID;
            }
            uscFileUplaod.UserId = AccessManagementService.Access.AccessControl.LoggedInUser.ID;

            var ds = projes.SearchZirProjeByConditions(projectCodes);
            Dictionary <string, string> phones = new Dictionary <string, string>();

            foreach (var phone in ds)
            {
                if (!phones.Any(x => x.Key == phone.Mobile))
                {
                    phones.Add(phone.Mobile, phone.NameMoshtary);
                }
            }

            grdProjecsSelect.DataSource = ds;
            grdProjecsSelect.DataBind();
            return(phones);
        }
Exemple #3
0
        void UscZirprojeSearchParameter_OnSearchCompelete(string WhereParameters)
        {
            var data = new Model.ZirProje().SearchZirProjeByConditions(WhereParameters);

            GrdZirPRoje.DataSource = data;
            GrdZirPRoje.DataBind();
        }
Exemple #4
0
        private void ImportFromExcel_ProjectGeneral_OnImportDataCompelete(System.Data.DataSet _ds)
        {
            var projes = new Model.ZirProje();
            var msg    = projes.ImportFromExcelProject(_ds);

            ViewState["IsNextStep"]       = true;
            ViewState["fehrestbahaCount"] = msg;
        }
Exemple #5
0
        private void ImportFromExcel_projectProperties_OnImportDataCompelete(System.Data.DataSet _ds)
        {
            grdShowProjecs.DataSource = _ds.Tables[0];
            grdShowProjecs.DataBind();
            //ViewState["__projectProperties"];

            var projes = new Model.ZirProje();
            var msg    = projes.ImportFromExcel(_ds, uscRoleSelect.RoleId, uscRoleSelect.UserId);

            ViewState["IsNextStep"] = true;
            //WebUtility.Helpers.RegisterHelpers.RegisterScript(this, "importExcel", "alert('salam')", true);
        }
Exemple #6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string mobile = AccessManagementService.Access.AccessControl.LoggedInUser.UserName;

            //string mobile = "9131044588"; // come from username after farmer login


            string condition = string.Format(" Mobile = '{0}'", mobile);

            Abyari.Model.ZirProje proje = new Model.ZirProje();
            grdProjecsSelect.DataSource = proje.SearchZirProjeByConditions(condition);
            grdProjecsSelect.DataBind();
        }
        private void ImportFromExcel_ProjectOne_OnImportDataCompelete(System.Data.DataSet _ds)
        {
            var        projes = new Model.ZirProje();
            DataColumn Col    = _ds.Tables[0].Columns.Add("ProjectID", typeof(System.String));

            Col.SetOrdinal(0);

            foreach (DataRow row in _ds.Tables[0].Rows)
            {
                row["ProjectID"] = selectedProjectID.Value;
            }
            //_ds.Tables[0].Rows[0]["ProjectID"] = selectedProjectID.Value;

            var msg = projes.ImportFromExcelProject(_ds);
        }
Exemple #8
0
        private void RadWizard3_NextButtonClick(object sender, Telerik.Web.UI.WizardEventArgs e)
        {
            bool   isNextstep   = ViewState["IsNextStep"] != null ? (bool)ViewState["IsNextStep"] : false;
            string projectCodes = ViewState["projectCode"] != null ? ViewState["projectCode"].ToString() : string.Empty;



            var projes = new Model.ZirProje();


            if (isNextstep == true)
            {
                if (e.CurrentStepIndex == 2)
                {
                    string fehrestbahaCount = ViewState["fehrestbahaCount"] != null ? ViewState["fehrestbahaCount"].ToString() : string.Empty;
                    string loolehaCount     = ViewState["loolehaCount"] != null ? ViewState["loolehaCount"].ToString() : string.Empty;

                    Dictionary <string, string> phonesName = new Dictionary <string, string>();
                    phonesName = UscGridWtihAttachment.DataBound(projectCodes);

                    if (new tkv.Utility.WebConfigurationHelper().GetAppSettingValue("SendSMS") == "yes")
                    {
                        Helpers.SMSHelpers sms = new Helpers.SMSHelpers();
                        sms.SendSMS(phonesName);
                    }

                    // for show report

                    lblProjectCount.Text     = phonesName.Count.ToString();
                    lblfehrestbahaCount.Text = fehrestbahaCount;
                    lblLoolehaCount.Text     = loolehaCount;
                }

                RadWizard3.ActiveStepIndex = e.CurrentStepIndex + 1;
                ViewState["IsNextStep"]    = false;
            }
            else
            {
                RadWizard3.ActiveStepIndex = e.CurrentStepIndex;
            }
        }
Exemple #9
0
        protected void Page_Load(object sender, EventArgs e)
        {
            MyEn = new AbyariEntities();

            if (!IsPostBack)
            {
                if (Helpers.ContextHelpers.GetZirProjeId() != int.MinValue)
                {
                    CodeZirProject             = Helpers.ContextHelpers.GetZirProjeId();
                    TxtEntekhabZirProject.Text = CodeZirProject.ToString();
                    DivNemayesh.Visible        = true;
                    Model.ZirProje MyZirProject = new Model.ZirProje();
                    MyZirProject = MyZirProject.GetZirProjeByCodeIncludes(CodeZirProject, null);
                    if (MyZirProject != null)
                    {
                        LblName.Text = MyZirProject.Name;
                        Lblcode.Text = MyZirProject.Code;
                    }
                }
            }
        }