示例#1
0
 private void BindEdit()
 {
     if (_type == "edit")
     {
         DataTable Dt = DALC.GetServicesPlansByID(_ServicesPlansID);
         if (Dt == null || Dt.Rows.Count < 1)
         {
             Config.MsgBoxAjax(Config._DefaultErrorMessages);
             return;
         }
         DListServicesPlansTypes.SelectedValue = Dt._Rows("ServicesPlansTypesID");
         TxtName.Text              = Dt._Rows("Name");
         TxtHours.Text             = Dt._Rows("Hours");
         TxtCount.Text             = Dt._Rows("Count");
         TxtPriority.Text          = Dt._Rows("Priority");
         DListStatus.SelectedValue = Dt._RowsInt("IsActive").ToString();
         BtnAdd.Text = "Yenilə";
     }
 }
示例#2
0
    public void BtnPermisSave_Click()
    {
        DataTable Dt = new DataTable();

        Dt.Columns.Add("UsersID", typeof(int));
        Dt.Columns.Add("UsersPermissionTypesID", typeof(int));
        Dt.Columns.Add("IsEdit", typeof(bool));
        Dt.Columns.Add("Add_Dt", typeof(DateTime));
        Dt.Columns.Add("Add_Ip", typeof(int));

        for (int i = 0; i < GrdTypes.Rows.Count; i++)
        {
            DropDownList D = (DropDownList)GrdTypes.Rows[i].Cells[1].Controls[1];

            if (D.SelectedValue != "0")
            {
                Dt.Rows.Add(
                    int.Parse(BtnAllPermissionSave.CommandArgument),
                    GrdTypes.DataKeys[i]["ID"]._ToInt16(),
                    (D.SelectedValue == "2"),
                    DateTime.Now,
                    Request.UserHostAddress.IPToInteger());
            }
        }

        int ChekDelete = DALC.DeleteUsersPermission(false, int.Parse(BtnAllPermissionSave.CommandArgument));

        if (ChekDelete < 0)
        {
            Config.MsgBoxAjax(Config._DefaultSystemErrorMessages, Page);
            return;
        }

        if (Dt.Rows.Count > 0)
        {
            int InsertChek = DALC.InsertBulk("UsersPermission", Dt);
            if (InsertChek < 1)
            {
                Config.MsgBoxAjax(Config._DefaultSystemErrorMessages, Page);
                return;
            }
        }
    }
示例#3
0
    protected void BtnSave_Click(object sender, EventArgs e)
    {
        //eger istifadeci ve admin deyilse
        if (DALC._GetAdministratorsLogin.UsersStatusID != 30 && DALC._GetAdministratorsLogin.UsersStatusID != 25)
        {
            return;
        }

        if (DListTopOrganization.SelectedValue == "-1")
        {
            Config.MsgBoxAjax("Tabeliyində olan qurumu seçin.");
            ShowPopup();
            return;
        }

        if (string.IsNullOrEmpty(TxtOrganizationName.Text.Trim()))
        {
            Config.MsgBoxAjax("Qurumun adını daxil edin.");
            ShowPopup();
            return;
        }

        int result = -1;

        if (ViewState["operation"]._ToString() == "new")
        {
            result = DALC.InsertOrganization(TxtOrganizationName.Text, DListTopOrganization.SelectedValue, ChkAktiv.Checked);
        }
        else if (ViewState["operation"]._ToString() == "edit")
        {
            result = DALC.UpdateOrganization(ViewState["OrganizationId"]._ToString(), TxtOrganizationName.Text, DListTopOrganization.SelectedValue, ChkAktiv.Checked);
        }

        if (result > 0)
        {
            Config.MsgBoxAjax(ViewState["operation"]._ToString() == "new" ? "Məlumatlar qeydə alındı." : "Məlumatlar redaktə edildi.", true);
            BindGrid();
        }
        else
        {
            Config.MsgBoxAjax(Config._DefaultErrorMessages);
        }
    }
示例#4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //Sadəcə alırıq. Yoxlamağa ehtiyac yoxdur. Content/Default.aspx də yoxlanılır.
        _PersonsID = Config._GetQueryString("i").QueryIdDecrypt()._ToInt32();

        if (!IsPostBack)
        {
            GridBind();
        }

        //Silinmə əməliyyatına icazə varmı?
        if (!DALC._IsPermissionTypeEdit(400))
        {
            LnkAdd.Visible  = false;
            PnlEdit.Visible = false;
            GrdList.Columns[GrdList.Columns.Count - 1].Visible = false;
            GrdList.Columns[GrdList.Columns.Count - 2].Visible = false;
        }
    }
示例#5
0
    private void BindList()
    {
        DataTable DtContent = DALC.GetDataTable("*", "Contents", "Where ID=1");

        LtrContentTitle.Text = DtContent._Rows("Title");
        LtrContentText.Text  = DtContent._Rows("ContentText");

        DListOrganizations.DataSource = DALC.GetDataTable("ID,Name", "AdoptionOrganizations", "Where AdoptionOrganizationsTypesID=20");
        DListOrganizations.DataBind();
        DListOrganizations.Items.Insert(0, new ListItem("- İcra Hakimiyyəti -", "-1"));

        DListEyeColor.DataSource = DALC.GetDataTable("ID,Name", "Colors", "");
        DListEyeColor.DataBind();
        DListEyeColor.Items.Insert(0, new ListItem("- Göz rəngi -", "-1"));

        DListHairColor.DataSource = DALC.GetDataTable("ID,Name", "Colors", "");
        DListHairColor.DataBind();
        DListHairColor.Items.Insert(0, new ListItem("- Saç rəngi -", "-1"));
    }
示例#6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     //eger emeliyaytci deyilse bu sehifeni menuda gore bilmez. demeli url-e yazib gelib bu sehifeye. error sehifesine redirect edek
     if (DALC._GetAdministratorsLogin.UsersStatusID != 30)
     {
         Config.RedirectError();
         return;
     }
     if (!this.IsPostBack)
     {
         DlistRegionalCenter.DataSource = DALC.GetRegionalCenters();
         DlistRegionalCenter.DataBind();
         DlistRegionalCenter.Items.Insert(0, new ListItem("--", "-1"));
         DlistUsersStatus.DataSource = DALC.GetUsersStatus();
         DlistUsersStatus.DataBind();
         DlistUsersStatus.Items.Insert(0, new ListItem("--", "-1"));
     }
     BindGrid();
 }
示例#7
0
    protected void GrdList_SelectedIndexChanged(object sender, EventArgs e)
    {
        PnlEdit.Visible = true;
        Aylar();
        Countries();
        BindTypes();

        DataTable Dt = DALC.GetDataTableParams("*", _TableName, "ID", GrdList.SelectedDataKey["ID"]._ToString(), "");

        if (Dt == null || Dt.Rows.Count < 1)
        {
            Config.MsgBoxAjax(Config._DefaultSystemErrorMessages, Page);
            return;
        }

        DListMecelle.SelectedValue = Dt._Rows("PersonsHuquqpozmaMecelleNovID").IsEmptyReplaceNoul();;
        TxtMehkemeAd.Text          = Dt._Rows("MehkemeAdi");
        TxtMadde.Text              = Dt._Rows("Madde");
        TxtMehkemeQerari.Text      = Dt._Rows("MehkemeQerari");
        TxtMehkemeQerarSayi.Text   = Dt._Rows("MehkemeQerarininSayi");
        DListQerarD.SelectedValue  = Dt._RowsObject("MehkemeQerarininTarixi").IntDateDay();
        DListQerarM.SelectedValue  = Dt._RowsObject("MehkemeQerarininTarixi").IntDateMonth();
        DListQerarY.SelectedValue  = Dt._RowsObject("MehkemeQerarininTarixi").IntDateYear();
        DListCezaNov.SelectedValue = Dt._Rows("PersonsHuquqpozmaCezaNovID").IsEmptyReplaceNoul();;
        TxtCezaMuessise.Text       = Dt._Rows("MuessiseAdi");
        DlistCountry.SelectedValue = Dt._Rows("MuessiseCountriesID").IsEmptyReplaceNoul();
        Regions(DlistCity, DlistCountry.SelectedValue);
        DlistCity.SelectedValue            = Dt._Rows("MuessiseRegionsID").IsEmptyReplaceNoul();
        TxtUnvan.Text                      = Dt._Rows("MuessiseUnvan");
        DListMonitoringD.SelectedValue     = Dt._RowsObject("MonitorinqTarixi").IntDateDay();
        DListMonitoringM.SelectedValue     = Dt._RowsObject("MonitorinqTarixi").IntDateMonth();
        DListMonitoringY.SelectedValue     = Dt._RowsObject("MonitorinqTarixi").IntDateYear();
        TxtMonitoringNeticesi.Text         = Dt._Rows("MonitorinqNeticesi");
        DListTerbiyeviTedbir.SelectedValue = Dt._Rows("PersonsHuquqpozmaMecburiTedbirNovID").IsEmptyReplaceNoul();;
        DListTenbehNov.SelectedValue       = Dt._Rows("PersonsHuquqpozmaTenbehNovID").IsEmptyReplaceNoul();;
        DListCezaAzad.SelectedValue        = Dt._Rows("PersonsHuquqpozmaAzadEdilmeSebebNovID").IsEmptyReplaceNoul();;
        DListCezaBitmeD.SelectedValue      = Dt._RowsObject("CezaninBitdiyiTarix").IntDateDay();
        DListCezaBitmeM.SelectedValue      = Dt._RowsObject("CezaninBitdiyiTarix").IntDateMonth();
        DListCezaBitmeY.SelectedValue      = Dt._RowsObject("CezaninBitdiyiTarix").IntDateYear();
        TxtDescription.Text                = Dt._Rows("Description");
        PnlEdit.Visible                    = true;
    }
    void BindDList()
    {
        DlistExecutiveUsers.DataSource = DALC.GetUsers();
        DlistExecutiveUsers.DataBind();
        DlistExecutiveUsers.Items.Insert(0, new ListItem("--", "-1"));

        DlistExecutiveUsersFilter.DataSource = DALC.GetUsers();
        DlistExecutiveUsersFilter.DataBind();
        DlistExecutiveUsersFilter.Items.Insert(0, new ListItem("--", "-1"));

        DListComplaintType.DataSource = DALC.GetComplaintType();
        DListComplaintType.DataBind();
        DListComplaintType.Items.Insert(0, new ListItem("--", "-1"));

        DListApplicatsGenderType.DataSource = DALC.GetGenderType();
        DListApplicatsGenderType.DataBind();
        DListApplicatsGenderType.Items.Insert(0, new ListItem("--", "-1"));

        DListApplicantsSocialStatus.DataSource = DALC.GetSocialStaus();
        DListApplicantsSocialStatus.DataBind();
        DListApplicantsSocialStatus.Items.Insert(0, new ListItem("--", "-1"));

        DListComplaintResultType.DataSource = DALC.GetComplaintResultType();
        DListComplaintResultType.DataBind();
        DListComplaintResultType.Items.Insert(0, new ListItem("--", "-1"));

        DListComplaintTypeFilter.DataSource = DALC.GetComplaintType();
        DListComplaintTypeFilter.DataBind();
        DListComplaintTypeFilter.Items.Insert(0, new ListItem("--", "-1"));

        DListApplicantsGenderTypeFilter.DataSource = DALC.GetGenderType();
        DListApplicantsGenderTypeFilter.DataBind();
        DListApplicantsGenderTypeFilter.Items.Insert(0, new ListItem("--", "-1"));

        DListApplicantsSocialStatusFilter.DataSource = DALC.GetSocialStaus();
        DListApplicantsSocialStatusFilter.DataBind();
        DListApplicantsSocialStatusFilter.Items.Insert(0, new ListItem("--", "-1"));

        DListComplaintResultTypeFilter.DataSource = DALC.GetComplaintResultType();
        DListComplaintResultTypeFilter.DataBind();
        DListComplaintResultTypeFilter.Items.Insert(0, new ListItem("--", "-1"));
    }
示例#9
0
    public void AdoptionAdministratorCheck()
    {
        DataTable Dt = DALC.GetDataTableMultiParams("*", "AdoptionAdministrators", new string[] { "Username", "Password", "IsActive" }, new object[] { Username, Password.SHA1Special(), true }, "");

        if (Dt == null)
        {
            Config.MsgBoxAjax(Config._DefaultSystemErrorMessages, Page);
            return;
        }

        if (Dt.Rows.Count != 1)
        {
            Config.MsgBoxAjax("Giriş baş tutmadı!", Page);
            return;
        }

        if (Dt._Rows("PermissionIP") != "*")
        {
            if (Dt._Rows("PermissionIP").IndexOf(Request.UserHostAddress) < 0)
            {
                Config.MsgBoxAjax("Mövcud IP üzrə sistemə giriş hüququnuz yoxdur.", Page);
                return;
            }
        }

        //Success
        DALC_Adoption.AdoptionAdministratorsInfoClass AdoptionAdministratorsInfoClass = new DALC_Adoption.AdoptionAdministratorsInfoClass();
        AdoptionAdministratorsInfoClass.ID       = Dt._RowsObject("ID")._ToInt16();
        AdoptionAdministratorsInfoClass.Fullname = Dt._Rows("Fullname");

        Session["AdoptionAdminLogin"] = AdoptionAdministratorsInfoClass;
        DALC_Adoption.AdoptionAdministratorsHistoryInsert("Sistemə giriş etdi.");

        if (Config._GetQueryString("return").Length > 0)
        {
            Config.Redirect(Config._GetQueryString("return"));
        }
        else
        {
            Config.Redirect("/adoptionadminn/tools/");
        }
    }
示例#10
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //Login control
        if (DALC._GetUsersLogin == null)
        {
            Config.Redirect("/?return=" + Request.Url.ToString());
            return;
        }

        // tarixcəyə baxmağa icazəsi yoxdursa ataq qırağa
        if (!DALC._IsPermissionType(30))
        {
            Config.Redirect("/");
            return;
        }

        PersonsID = Config._GetQueryString("i").QueryIdDecrypt().Replace("-1", "");

        if (!string.IsNullOrEmpty(PersonsID) && !PersonsID.IsNumeric())
        {
            Config.RedirectMain();
            return;
        }

        if (!IsPostBack)
        {
            DListPermissionsType.DataSource = DALC.GetUsersPermissionTypesList();
            DListPermissionsType.DataBind();
            DListPermissionsType.Items.Insert(0, new ListItem("--", "0"));

            DListOrganization.DataSource = DALC.GetOrganizations();
            DListOrganization.DataBind();
            DListOrganization.Items.Insert(0, new ListItem("--", "0"));

            DListOrganization_SelectedIndexChanged(null, null);

            DListHistoryTypes.DataSource = DALC.GetHistoryTypes();
            DListHistoryTypes.DataBind();
            DListHistoryTypes.Items.Insert(0, new ListItem("--", "0"));
            LnkOtherApp_Click(null, null);
        }
    }
示例#11
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (DALC._GetUsersLogin == null)
        {
            Config.RedirectLogin();
            return;
        }

        if (!DALC.IsPermission(Tools.UsersPermissionsModules.Qiymətləndirilənlər))
        {
            Config.RedirectURL("/tools");
            return;
        }

        CheckQuery();

        ((Literal)Master.FindControl("LtrTitle")).Text        = "Daxili qiymətləndirmə 2";
        ((Literal)HeaderInfo.FindControl("ltrFullName")).Text = DALC.GetApplicationsPersonsFullName(_ApplicationsPersonsID);

        HyperLink HyperLnk1 = (HyperLink)HeaderTab.FindControl("HrpTab1");
        HyperLink HyperLnk2 = (HyperLink)HeaderTab.FindControl("HrpTab2");
        HyperLink HyperLnk3 = (HyperLink)HeaderTab.FindControl("HrpTab3");

        int EvaluationsCount      = DALC.GetEvaluationsCountByPersonsID(_ApplicationsPersonsID);
        int SIBRCount             = DALC.GetSIBRCountByApplicationsPersonsID(_ApplicationsPersonsID);
        int EvaluationsSkillCount = DALC.GetEvaluationsSkillCountByPersonsID(_ApplicationsPersonsID);

        HyperLnk1.Text        = string.Format(HyperLnk1.Text, SIBRCount);
        HyperLnk1.NavigateUrl = string.Format("/tools/sib-r/?i={0}", Config._GetQueryString("i").Replace(' ', '+'));

        HyperLnk2.Text        = string.Format(HyperLnk2.Text, EvaluationsCount);
        HyperLnk2.NavigateUrl = string.Format("/tools/evaluations/?i={0}", Config._GetQueryString("i").Replace(' ', '+'));

        HyperLnk3.Text        = string.Format(HyperLnk3.Text, EvaluationsSkillCount);
        HyperLnk3.NavigateUrl = string.Format("/tools/evaluationsskill/?i={0}", Config._GetQueryString("i").Replace(' ', '+'));
        HyperLnk3.CssClass    = "active";

        if (!IsPostBack)
        {
            BindGrdEvaluations();
        }
    }
示例#12
0
    void BindDList()
    {
        //DListCallCenterType.DataSource = DALC.GetCallCenterType();
        //DListCallCenterType.DataBind();
        //DListCallCenterType.Items.Insert(0, new ListItem("--", "-1"));

        //DlistCallCenterTypeFilter.DataSource = DALC.GetCallCenterType();
        //DlistCallCenterTypeFilter.DataBind();
        //DlistCallCenterTypeFilter.Items.Insert(0, new ListItem("--", "-1"));

        DListComplaintType.DataSource = DALC.GetComplaintType();
        DListComplaintType.DataBind();
        DListComplaintType.Items.Insert(0, new ListItem("--", "-1"));

        DListApplicantGenderType.DataSource = DALC.GetGenderType();
        DListApplicantGenderType.DataBind();
        DListApplicantGenderType.Items.Insert(0, new ListItem("--", "-1"));

        DListApplicantSocialStatus.DataSource = DALC.GetSocialStaus();
        DListApplicantSocialStatus.DataBind();
        DListApplicantSocialStatus.Items.Insert(0, new ListItem("--", "-1"));

        DListComplaintResultType.DataSource = DALC.GetComplaintResultType();
        DListComplaintResultType.DataBind();
        DListComplaintResultType.Items.Insert(0, new ListItem("--", "-1"));

        DListComplaintTypeFilter.DataSource = DALC.GetComplaintType();
        DListComplaintTypeFilter.DataBind();
        DListComplaintTypeFilter.Items.Insert(0, new ListItem("--", "-1"));

        DListApplicantGenderTypeFilter.DataSource = DALC.GetGenderType();
        DListApplicantGenderTypeFilter.DataBind();
        DListApplicantGenderTypeFilter.Items.Insert(0, new ListItem("--", "-1"));

        DListApplicantSocialStatusFilter.DataSource = DALC.GetSocialStaus();
        DListApplicantSocialStatusFilter.DataBind();
        DListApplicantSocialStatusFilter.Items.Insert(0, new ListItem("--", "-1"));

        DListComplaintResultTypeFilter.DataSource = DALC.GetComplaintResultType();
        DListComplaintResultTypeFilter.DataBind();
        DListComplaintResultTypeFilter.Items.Insert(0, new ListItem("--", "-1"));
    }
示例#13
0
    protected void BtnConfirm_Click(object sender, EventArgs e)
    {
        if (TxtOldPassword.Text.Length < 1)
        {
            Config.MsgBoxAjax("Köhnə şifrəni daxil edin.");
            return;
        }

        if (TxtNewPassword.Text.Length < 4)
        {
            Config.MsgBoxAjax("Yeni şifrə ən az 4 simvoldan ibarət olmalıdır.");
            return;
        }

        if (TxtNewPassword.Text != TxtBackPassword.Text)
        {
            Config.MsgBoxAjax("Yeni şifərləriniz uyğun gəlmir.");
            return;
        }

        if (Config.Sha1(TxtOldPassword.Text) != DALC.GetSingleValues("Password", "Users", "ID", DALC._GetAdministratorsLogin.ID, "", ""))
        {
            Config.MsgBoxAjax("Köhnə şifrəniz yalnışdır.");
            return;
        }

        Dictionary <string, object> Dictionary = new Dictionary <string, object>();

        Dictionary.Add("Password", Config.Sha1(TxtNewPassword.Text));
        Dictionary.Add("WhereID", DALC._GetAdministratorsLogin.ID);

        int ChekUpdate = DALC.UpdateDatabase("Users", Dictionary);

        if (ChekUpdate < 1)
        {
            Config.MsgBoxAjax(Config._DefaultErrorMessages);
        }
        else
        {
            Config.MsgBoxAjax(Config._DefaultSuccessMessages, true);
        }
    }
示例#14
0
    protected void LnkDelete_Click(object sender, EventArgs e)
    {
        int ApplicationsSocialStatusID = int.Parse((sender as LinkButton).CommandArgument);

        Dictionary <string, object> Dictionary = new Dictionary <string, object>
        {
            { "IsDeleted", 1 },
            { "WhereID", ApplicationsSocialStatusID },
        };

        int Check = DALC.UpdateDatabase(Tools.Table.ApplicationsSocialStatus, Dictionary);

        if (Check < 1)
        {
            Config.MsgBoxAjax(Config._DefaultErrorMessages);
            return;
        }

        BindGridApplicationsStatus(int.Parse(BtnAddApp.CommandArgument));
    }
示例#15
0
    protected void BtnResetPassword_Click(object sender, EventArgs e)
    {
        string ResetPassword = Config.Key(6);
        Dictionary <string, object> Dictionary = new Dictionary <string, object>();

        Dictionary.Add("Password", ResetPassword.SHA1Special());
        Dictionary.Add("WhereID", int.Parse(BtnSaveUsers.CommandArgument));

        int Chek = DALC.UpdateDatabase("Users", Dictionary);

        if (Chek < 1)
        {
            Config.MsgBoxAjax(Config._DefaultSystemErrorMessages, Page);
            return;
        }

        DALC.AdministratorsHistoryInsert(BtnSaveUsers.CommandArgument + " № li İstifadəçinin şifərsi dəyişdirildi(Reset Password). Yeni şifrə: " + ResetPassword.Substring(0, 3) + "***");
        Config.MsgBoxAjax("İstfifadəçi şifrəsi yeniləndi. ", Page, true);
        LblPass.Text = "Yeni şifrə: <b>" + ResetPassword + "</b>";
    }
示例#16
0
    protected void BtnSaveContent_Click(object sender, EventArgs e)
    {
        Dictionary <string, object> DictContent = new Dictionary <string, object>();

        DictContent.Add("Title", TxtContentTitle.Text);
        DictContent.Add("ContentText", TxtContent.Text);
        DictContent.Add("Add_Dt", DateTime.Now);
        DictContent.Add("Update_Dt", DateTime.Now);
        DictContent.Add("WhereID", int.Parse(BtnSaveContent.CommandArgument));

        int Chek = DALC.UpdateDatabase("Contents", DictContent);

        if (Chek < 1)
        {
            Config.MsgBoxAjax(Config._DefaultSystemErrorMessages, Page, false);
            return;
        }

        Config.MsgBoxAjax("Məlumat yeniləndi.", Page, true);
    }
示例#17
0
    protected void lnkDeleted_Click(object sender, EventArgs e)
    {
        var dictionaryServicesOrganizations = new Dictionary <string, object>()
        {
            { "IsActive", false },
            { "WhereId", int.Parse((sender as LinkButton).CommandArgument) }
        };

        int resultId = DALC.UpdateDatabase(Tools.Tables.ServicesOrganizations, dictionaryServicesOrganizations);

        if (resultId < 1)
        {
            ConfigL.MsgBoxAjax(Config._AlertMessages.Error);
            return;
        }

        BindServicesOrganizations();
        BindDList();
        ConfigL.MsgBoxAjax(Config._AlertMessages.Success);
    }
示例#18
0
    public void Countries()
    {
        DataTable Dt = DALC.GetCountriesList();

        DlistCountry.DataSource = Dt;
        DlistCountry.DataBind();
        DlistCountry.Items.Insert(0, new ListItem("--", "0"));

        DlistCountry2.DataSource = Dt;
        DlistCountry2.DataBind();

        DlistCountry3.DataSource = Dt;
        DlistCountry3.DataBind();
        DlistCountry3.Items.Insert(0, new ListItem("--", "0"));
        Regions(DlistCity3, DlistCountry3.SelectedValue);

        //Yaşadığı ünvan daimi Azərbaycan olmalıdır.
        DlistCountry2.SelectedValue = "1";
        Regions(DlistCity2, DlistCountry2.SelectedValue);
    }
示例#19
0
    private void BindList()
    {
        dListOrganizations.DataSource = DALCL.GetActiveOrganizations();
        dListOrganizations.DataBind();
        dListOrganizations.Items.Insert(0, new ListItem("--", "-1"));

        dlistCalendar.DataSource = DALC.GetDataTableBySqlCommand("Select Id,Name from CalendarOganizations Where IsActive=1 and OrganizationsId=@OrganizationsId Order by Name asc", "OrganizationsId", new object[] { DALCL._Login.organizationsId });
        dlistCalendar.DataBind();
        dlistCalendar.Items.Insert(0, new ListItem("--", "-1"));

        dListOrganizations.SelectedValue = DALCL._Login.administratorsId.ToString();
        dListOrganizations.Enabled       = false;

        dListAdministratorsStatusId.DataSource = DALCL.GetAdministratorsStatus();
        dListAdministratorsStatusId.DataBind();
        dListAdministratorsStatusId.Items.Insert(0, new ListItem("--", "-1"));

        grdAdministratorsMenu.DataSource = DALCL.GetAdministratorsMenu(0);
        grdAdministratorsMenu.DataBind();
    }
示例#20
0
    protected void BtnReset_Click(object sender, EventArgs e)
    {
        string GeneratedPassword = Config.Key(4);
        Dictionary <string, object> Dictionary = new Dictionary <string, object>()
        {
            { "Password", Config.SHA1Special(GeneratedPassword) },
            { "WhereUsersID", int.Parse(BtnUserInfoSave.CommandArgument) }
        };

        int Check = DALC.UpdateDatabase(Tools.Table.UsersAccounts, Dictionary);

        if (Check < 1)
        {
            Config.MsgBoxAjax(Config._DefaultErrorMessages);
            return;
        }

        LblResettingPassword.Visible = true;
        LblResettingPassword.Text    = "Şifrə uğurla sıfırlandı.Yeni şifrəniz: <b>" + GeneratedPassword + "</b>";
    }
示例#21
0
    protected void LnkEdit_Click(object sender, EventArgs e)
    {
        string    EvaluationsSkillID = (sender as LinkButton).CommandArgument;
        DataTable Dt = DALC.GetEvaluationsSkillByID(int.Parse(EvaluationsSkillID));

        if (Dt == null || Dt.Rows.Count < 1)
        {
            Config.MsgBoxAjax(Config._DefaultErrorMessages);
            return;
        }

        BtnSave.CommandName          = EvaluationsSkillID;
        BtnSave.CommandArgument      = "edit";
        PnlCompleted.Visible         = true;
        TxtDate.Text                 = ((DateTime)Dt._RowsObject("Create_Dt")).ToString("dd.MM.yyyy");
        DListCompleted.SelectedValue = Dt._RowsObject("IsCompleted")._ToInt16().ToString();
        DListCompleted.Enabled       = PnlModalFooter.Visible = DListCompleted.SelectedValue == "0";

        Config.Modal();
    }
示例#22
0
    protected void LnkOperations_Click(object sender, EventArgs e)
    {
        LinkButton Lnk            = (sender as LinkButton);
        string     PersonsID      = Lnk.CommandArgument;
        string     ApplicationsID = Lnk.CommandName;

        LtrTitle.Text = "Əməliyyatlar";

        HyperLink HypEvaluations = (HyperLink)Operations.FindControl("HypEvaluations");
        HyperLink HypCase        = (HyperLink)Operations.FindControl("HypCase");
        HyperLink HypServices    = (HyperLink)Operations.FindControl("HypServices");


        HypEvaluations.NavigateUrl = string.Format("/tools/sib-r/?i={0}", Cryptography.Encrypt(string.Format("{0}-{1}-{2}", ApplicationsID, PersonsID, DALC._GetUsersLogin.Key)));
        HypCase.NavigateUrl        = string.Format("/tools/applications/case/?i={0}", Cryptography.Encrypt(string.Format("{0}-{1}-{2}", ApplicationsID, PersonsID, DALC._GetUsersLogin.Key)));
        HypServices.NavigateUrl    = string.Format("/tools/services/?i={0}", Cryptography.Encrypt(string.Format("{0}-{1}-{2}", ApplicationsID, PersonsID, DALC._GetUsersLogin.Key)));

        //Eger muracietde CASE acilan vetendash varsa onun ID sini aliriq
        string CasePersonsID = DALC.GetSingleValues("ID", Tools.Table.V_ApplicationsPersons, "ApplicationsCaseID is not null and ApplicationsID", _ApplicationsID, "");

        if (CasePersonsID == "-1")
        {
            Config.MsgBoxAjax(Config._DefaultErrorMessages);
            return;
        }

        //Varsa yoxalayiriq secilenle eynidirse Case buttonunu aktiv edirik deyilse false ve ya yoxdursa her ikisinde aktiv olur
        if (!string.IsNullOrEmpty(CasePersonsID) && CasePersonsID != PersonsID)
        {
            HypCase.Enabled = false;
            HypCase.Text    = HypCase.Text.Replace("case_on", "case_of");
        }
        else
        {
            HypCase.Text    = HypCase.Text.Replace("case_of", "case_on");
            HypCase.Enabled = true;
        }

        MultiView1.ActiveViewIndex = 1;
        Config.Modal();
    }
示例#23
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (DALCL._Login == null)
        {
            ConfigL.RedirectLogin();
            return;
        }

        if (!DALCL.CheckPermission(Tools.AdministratorsMenu.Kalendar))
        {
            ConfigL.RedirectError();
            return;
        }

        ((Literal)Master.FindControl("LtrTitle")).Text = "KALENDAR";

        if (!IsPostBack)
        {
            DlistOrganizations.DataSource = DALC.GetDataTable("Id,Name", Tools.Tables.CalendarOganizations, "Where IsActive=1 Order by Name asc");
            DlistOrganizations.DataBind();
            DlistOrganizations.Items.Insert(0, new ListItem("--", "0"));

            DlistTypes.DataSource = DALC.GetDataTable("Id,Name", Tools.Tables.CalendarTypes, "Where IsActive=1 Order by Priority asc");
            DlistTypes.DataBind();
            DlistTypes.Items.Insert(0, new ListItem("--", "0"));

            for (int i = 0; i < MonthList.Length; i++)
            {
                DlistMonth.Items.Add(new ListItem(MonthList[i], (i + 1).ToString()));
            }

            for (int i = 2015; i < DateTime.Now.Year + 5; i++)
            {
                DlistYear.Items.Add(i.ToString());
            }

            LnkToday.Text = $"Bugün ({DateTime.Now.ToString("dd.MM.yyyy")})";

            ICalendarDataBind(DateTime.Now.Month, DateTime.Now.Year);
        }
    }
示例#24
0
    protected void LnkEdit_Click(object sender, EventArgs e)
    {
        DataTable DtPersons = DALC.GetAuditsOrganizationsMeetingPersonsByID(int.Parse((sender as LinkButton).CommandArgument));

        if (DtPersons == null || DtPersons.Rows.Count < 1)
        {
            Config.MsgBoxAjax(Config._DefaultErrorMessages);
            return;
        }

        BtnSaveMeetingPerson.CommandArgument = (sender as LinkButton).CommandArgument;
        BtnSaveMeetingPerson.CommandName     = "edit";

        //TxtMeetinPersonComplaintNumber.Text = DtPersons._Rows("ComplaintNumbers");
        TxtMeetingPersonFullname.Text       = DtPersons._Rows("Fullname");
        DListGenderType.SelectedValue       = string.IsNullOrEmpty(DtPersons._Rows("GenderTypeID")) ? "-1" : DtPersons._Rows("GenderTypeID");
        DListSocialStatus.SelectedValue     = string.IsNullOrEmpty(DtPersons._Rows("SocialStatusID")) ? "-1" : DtPersons._Rows("SocialStatusID");
        TxtMeetingPersonPlace.Text          = DtPersons._Rows("Place");
        TxtMeetingPersonAccusedArticle.Text = DtPersons._Rows("AccusedArticles");

        TxtMeetingPersonStartPunishmentPeriod.Text = "";
        TxtMeetingPersonEndPunishmentPeriod.Text   = "";

        if (!string.IsNullOrEmpty(DtPersons._Rows("StartPunishmentPeriod")))
        {
            TxtMeetingPersonStartPunishmentPeriod.Text = ((DateTime)DtPersons._RowsObject("StartPunishmentPeriod")).ToString("dd.MM.yyyy");
        }

        if (!string.IsNullOrEmpty(DtPersons._Rows("EndPunishmentPeriod")))
        {
            TxtMeetingPersonEndPunishmentPeriod.Text = ((DateTime)DtPersons._RowsObject("EndPunishmentPeriod")).ToString("dd.MM.yyyy");
        }


        TxtMeetingPersonProblem.Text           = DtPersons._Rows("Problems");
        DListComplaintResultType.SelectedValue = string.IsNullOrEmpty(DtPersons._Rows("ComplaintResultTypeID")) ? "-1" : DtPersons._Rows("ComplaintResultTypeID");
        TxtMeetingPersonsResult.Text           = DtPersons._Rows("Results");
        TxtMeetingPersonMeetingDt.Text         = ((DateTime)DtPersons._RowsObject("Meeting_Dt")).ToString("dd.MM.yyyy");

        ShowPopup();
    }
示例#25
0
    private void BindServices()
    {
        DALC.DataTableResult result = new DALC.DataTableResult();
        var dictionary = new Dictionary <string, object>()
        {
            { "Id", txtServicesId.Text },
            { "ServicesTypesId", int.Parse(ConfigL._Route("servicestypesid", "10")) },
            { "LangsId", Langs.Id },
            { "IsActive", int.Parse(dListServicesStatus.SelectedValue) },
        };

        result = DALC.GetFilterList(Tools.Tables.V_Services, dictionary, 1, 500);

        if (result.Count == -1)
        {
            return;
        }

        grdSrvices.DataSource = result.Dt;
        grdSrvices.DataBind();
    }
示例#26
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            DListPermissionsType.DataSource = DALC.GetUsersPermissionTypesList();
            DListPermissionsType.DataBind();
            DListPermissionsType.Items.Insert(0, new ListItem("--", "0"));

            DListOrganization.DataSource = DALC.GetOrganizations();
            DListOrganization.DataBind();
            DListOrganization.Items.Insert(0, new ListItem("--", "0"));

            DListOrganization_SelectedIndexChanged(null, null);

            DListHistoryTypes.DataSource = DALC.GetHistoryTypes();
            DListHistoryTypes.DataBind();
            DListHistoryTypes.Items.Insert(0, new ListItem("--", "0"));

            LnkOtherApp_Click(null, null);
        }
    }
示例#27
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (DALC._GetUsersLogin == null)
        {
            Config.RedirectLogin();
            return;
        }

        if (!DALC.IsPermission(Tools.UsersPermissionsModules.Təqvim_planı))
        {
            Config.RedirectURL("/tools");
            return;
        }

        if (!IsPostBack)
        {
            ((Literal)Master.FindControl("LtrTitle")).Text = "Ümumi təqvim planı";
            BindDList();
            BindGrdServices();
        }
    }
示例#28
0
    protected void GrdList_SelectedIndexChanged(object sender, EventArgs e)
    {
        PnlEdit.Visible = true;
        Aylar();
        MuavinatNov();

        DataTable Dt = DALC.GetDataTableParams("*", _TableName, "ID", GrdList.SelectedDataKey["ID"]._ToString(), "");

        if (Dt == null || Dt.Rows.Count < 1)
        {
            Config.MsgBoxAjax(Config._DefaultSystemErrorMessages, Page);
            return;
        }

        DListMuavinatNov.SelectedValue = Dt._Rows("PersonsMuavinatNovID").IsEmptyReplaceNoul();
        DListMuavinatD.SelectedValue   = Dt._RowsObject("MuavinatinBaslamaTarixi").IntDateDay();
        DListMuavinatM.SelectedValue   = Dt._RowsObject("MuavinatinBaslamaTarixi").IntDateMonth();
        DListMuavinatY.SelectedValue   = Dt._RowsObject("MuavinatinBaslamaTarixi").IntDateYear();
        TxtDescription.Text            = Dt._Rows("Description");
        PnlEdit.Visible = true;
    }
示例#29
0
    private void BindSurveysAnswers()
    {
        pnlAnswers.Visible = true;
        DALC.DataTableResult result = new DALC.DataTableResult();
        var dictionary = new Dictionary <string, object>()
        {
            { "SurveysId", _surveysId },
            { "LangsId", Langs.Id },
            { "IsActive", true }
        };

        result = DALC.GetFilterList(Tools.Tables.V_SurveysAnswers, dictionary, 1, 500, "T.*", "", "Order By Id asc");

        if (result.Count == -1)
        {
            return;
        }

        grdSurveysAnswers.DataSource = result.Dt;
        grdSurveysAnswers.DataBind();
    }
示例#30
0
    private void BindServicesOrganizations()
    {
        DALC.DataTableResult result = new DALC.DataTableResult();
        var dictionary = new Dictionary <string, object>()
        {
            { "OrganizationsLangsId", Langs.Id },
            { "ServicesTypesId", (int)Tools.ServicesTypes.Xidmətlər },
            { "ServicesLangsId", Langs.Id },
            { "IsActive", true },
        };

        result = DALC.GetFilterList(Tools.Tables.V_ServicesOrganizations, dictionary, 1, 500);

        if (result.Count == -1)
        {
            return;
        }

        grdSrvices.DataSource = result.Dt;
        grdSrvices.DataBind();
    }