Пример #1
0
    protected void Repeater_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        DataRowView row = (DataRowView)e.Item.DataItem;
        CheckBox    cb  = (CheckBox)e.Item.FindControl("ItemSelect");

        WebFormUtils.LoadKeys(db, row, cb);
        cb.Visible = IsAllowEdit;
        if (CurID > 0)
        {
            DataRow dataRow = row.Row;

            if (dataRow.Table.Columns.Contains("TaxEmpID"))
            {
                cb.Checked = false;
                if (!dataRow.IsNull("TaxEmpGeneratedByUserID"))
                {
                    EUser user = new EUser();
                    if (user.LoadDBObject(dbConn, dataRow["TaxEmpGeneratedByUserID"]))
                    {
                        Label TaxEmpGeneratedByUserID = (Label)e.Item.FindControl("TaxEmpGeneratedByUserID");
                        TaxEmpGeneratedByUserID.Text = user.UserName;
                    }
                }
            }
            else
            {
                cb.Checked = true;
            }
        }
        else
        {
            cb.Checked = true;
        }
    }
    protected void paymentNotMappedRepeater_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        DataRowView row = (DataRowView)e.Item.DataItem;
        CheckBox    cb  = (CheckBox)e.Item.FindControl("ItemSelect");

        WebFormUtils.LoadKeys(EPaymentCode.db, row, cb);
    }
Пример #3
0
    protected void Repeater_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        DataRowView row = (DataRowView)e.Item.DataItem;
        CheckBox    cb  = (CheckBox)e.Item.FindControl("ItemSelect");

        WebFormUtils.LoadKeys(EMPFSchemeCessationReasonMapping.db, row, cb);
    }
Пример #4
0
    protected void Repeater_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        DataRowView row = (DataRowView)e.Item.DataItem;
        CheckBox    cb  = (CheckBox)e.Item.FindControl("ItemSelect");

        WebFormUtils.LoadKeys(sdb, row, cb);
        e.Item.FindControl("ItemSelect").Visible = toolBar.DeleteButton_Visible;

        EEmpRecurringPayment obj = new EEmpRecurringPayment();

        sdb.toObject(((DataRowView)e.Item.DataItem).Row, obj);
        Hashtable values = new Hashtable();

        sdb.populate(obj, values);

        Binding eBinding = new Binding(dbConn, sdb);

        eBinding.add(new BlankZeroLabelVLBinder(sdb, (Label)e.Item.FindControl("CostCenterID"), ECostCenter.VLCostCenter).setTextDisplayForZero(HROne.Common.WebUtility.GetLocalizedString(ECostCenter.DEFAULT_COST_CENTER_TEXT)));

        eBinding.init(Request, Session);

        eBinding.toControl(values);

        ((HtmlTableCell)e.Item.FindControl("CostCenterDetailCell")).Visible = WebUtils.productLicense(Session).IsCostCenter;
        //((HtmlTableCell)e.Item.FindControl("RemarkCell")).ColSpan = ((HtmlTableRow)e.Item.FindControl("detailRow")).Cells.Count - 1 - (WebUtils.productLicense(Session).IsCostCenter ? 0 : 1);
    }
Пример #5
0
    protected void Repeater_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        DataRowView row = (DataRowView)e.Item.DataItem;
        CheckBox    cb  = (CheckBox)e.Item.FindControl("ItemSelect");

        EUser obj = new EUser();

        db.toObject(((DataRowView)e.Item.DataItem).Row, obj);

        EUser user = WebUtils.GetCurUser(Session);

        if (obj.UserID.Equals(1))
        {
            cb.Visible = false;
        }
        else if (user != null)
        {
            if (obj.UserID.Equals(user.UserID))
            {
                cb.Visible = false;
            }
        }

        WebFormUtils.LoadKeys(db, row, cb);
    }
Пример #6
0
    protected void companyRepeater_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
        {
            DataRowView row = (DataRowView)e.Item.DataItem;
            CheckBox    cb  = (CheckBox)e.Item.FindControl("ItemSelect");
            WebFormUtils.LoadKeys(ECompany.db, row, cb);

            ECompany company = new ECompany();
            ECompany.db.toObject(row.Row, company);
            cb.Text = string.Format("{0} - {1}", new string[] { company.CompanyCode, company.CompanyName });

            DBFilter companyBankAccountMapFilter = new DBFilter();
            companyBankAccountMapFilter.add(new Match("CompanyID", company.CompanyID));
            companyBankAccountMapFilter.add(new Match("CompanyBankAccountID", CurID));
            if (ECompanyBankAccountMap.db.count(dbConn, companyBankAccountMapFilter) > 0)
            {
                cb.Checked = true;
            }
            else
            {
                cb.Checked = false;
            }
        }
    }
    protected void Repeater_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        DataRowView row = (DataRowView)e.Item.DataItem;

        EHSBCBankPaymentCode obj = new EHSBCBankPaymentCode();

        sdb.toObject(((DataRowView)e.Item.DataItem).Row, obj);

        CheckBox cb = (CheckBox)e.Item.FindControl("ItemSelect");

        WebFormUtils.LoadKeys(sdb, row, cb);

        Label HSBCBankPaymentCodeBankAccountNo = (Label)e.Item.FindControl("HSBCBankPaymentCodeBankAccountNo");
        Label HSBCBankPaymentCode = (Label)e.Item.FindControl("HSBCBankPaymentCode");
        Label HSBCBankPaymentCodeAutoPayInOutFlag = (Label)e.Item.FindControl("HSBCBankPaymentCodeAutoPayInOutFlag");

        HSBCBankPaymentCodeBankAccountNo.Text = obj.HSBCBankPaymentCodeBankAccountNo.Insert(6, "-").Insert(3, "-");
        HSBCBankPaymentCode.Text = obj.HSBCBankPaymentCode;
        if (obj.HSBCBankPaymentCodeAutoPayInOutFlag.Equals("I"))
        {
            HSBCBankPaymentCodeAutoPayInOutFlag.Text = "In";
        }
        else if (obj.HSBCBankPaymentCodeAutoPayInOutFlag.Equals("O"))
        {
            HSBCBankPaymentCodeAutoPayInOutFlag.Text = "Out";
        }
        else
        {
            HSBCBankPaymentCodeAutoPayInOutFlag.Text = obj.HSBCBankPaymentCodeAutoPayInOutFlag;
        }
        //cb.Visible = toolBar.DeleteButton_Visible;
    }
Пример #8
0
    protected void ReminderRepeater_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        DataRowView row = (DataRowView)e.Item.DataItem;
        CheckBox    cb  = (CheckBox)e.Item.FindControl("ItemSelect");

        WebFormUtils.LoadKeys(EReminderType.db, row, cb);

        ((Label)e.Item.FindControl("ReminderTypeDesc")).Text = row["ReminderTypeDesc"].ToString();

        HROne.Common.WebUtility.WebControlsLocalization(this, e.Item.Controls);

        if (!Page.IsPostBack)
        {
            DBFilter userReminderOptionFilter = new DBFilter();
            userReminderOptionFilter.add(new Match("UserID", CurID));
            userReminderOptionFilter.add(new Match("ReminderTypeID", row["ReminderTypeID"]));

            ArrayList userReminderList = EUserReminderOption.db.select(dbConn, userReminderOptionFilter);
            if (userReminderList.Count > 0)
            {
                cb.Checked = true;
                EUserReminderOption userReminder = (EUserReminderOption)userReminderList[0];
                if (userReminder.UserReminderOptionRemindDaysBefore >= 0)
                {
                    ((TextBox)e.Item.FindControl("UserReminderOptionRemindDaysBefore")).Text = userReminder.UserReminderOptionRemindDaysBefore.ToString();
                }
                if (userReminder.UserReminderOptionRemindDaysAfter >= 0)
                {
                    ((TextBox)e.Item.FindControl("UserReminderOptionRemindDaysAfter")).Text = userReminder.UserReminderOptionRemindDaysAfter.ToString();
                }
            }
        }
    }
Пример #9
0
    protected void Repeater_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        DataRowView row = (DataRowView)e.Item.DataItem;
        CheckBox    cb  = (CheckBox)e.Item.FindControl("ItemSelect");

        WebFormUtils.LoadKeys(sdb, row, cb);
        e.Item.FindControl("ItemSelect").Visible = toolBar.DeleteButton_Visible;

        EEmpSkill obj = new EEmpSkill();

        EEmpSkill.db.toObject(row.Row, obj);
        Hashtable values = new Hashtable();

        EEmpSkill.db.populate(obj, values);

        Binding eBinding;

        eBinding = new Binding(dbConn, EEmpSkill.db);
        eBinding.add(new BlankZeroLabelVLBinder(EEmpSkill.db, (Label)e.Item.FindControl("SkillID"), ESkill.VLSkill));
        eBinding.add(new BlankZeroLabelVLBinder(EEmpSkill.db, (Label)e.Item.FindControl("SkillLevelID"), ESkillLevel.VLSkillLevel));

        eBinding.init(Request, Session);

        eBinding.toControl(values);
    }
Пример #10
0
    protected void Repeater_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        DataRowView row = (DataRowView)e.Item.DataItem;
        CheckBox    cb  = (CheckBox)e.Item.FindControl("ItemSelect");

        WebFormUtils.LoadKeys(EPaymentCode.db, row, cb);



        DBFilter avcPlanCeilingFilter = new DBFilter();

        avcPlanCeilingFilter.add(new Match("AVCPlanID", CurID));
        avcPlanCeilingFilter.add(new Match("PaymentCodeID", row["PaymentCodeID"]));
        ArrayList avcPlanCeilingList = EAVCPlanPaymentCeiling.db.select(dbConn, avcPlanCeilingFilter);

        if (avcPlanCeilingList.Count != 0)
        {
            TextBox textBox = (TextBox)e.Item.FindControl("AVCPlanPaymentCeilingAmount");
            textBox.Text = ((EAVCPlanPaymentCeiling)avcPlanCeilingList[0]).AVCPlanPaymentCeilingAmount.ToString("0.00");
            //((CheckBox)e.Item.FindControl("AVCPlanConsiderAfterMPFOnly")).Checked = ((EAVCPlanPaymentCeiling)avcPlanCeilingList[0]).AVCPlanConsiderAfterMPFOnly;
            //cb.Checked = true;
        }
        ArrayList avcPlanConsiderList = EAVCPlanPaymentConsider.db.select(dbConn, avcPlanCeilingFilter);

        if (avcPlanConsiderList.Count != 0)
        {
            ((CheckBox)e.Item.FindControl("AVCPlanPaymentConsiderAfterMPF")).Checked = ((EAVCPlanPaymentConsider)avcPlanConsiderList[0]).AVCPlanPaymentConsiderAfterMPF;
            //cb.Checked = true;
        }
    }
    protected void Repeater_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        DataRowView row = (DataRowView)e.Item.DataItem;
        CheckBox    cb  = (CheckBox)e.Item.FindControl("ItemSelect");

        WebFormUtils.LoadKeys(sdb, row, cb);

        EEmpWorkExp obj = new EEmpWorkExp();

        EEmpWorkExp.db.toObject(((DataRowView)e.Item.DataItem).Row, obj);
        Hashtable values = new Hashtable();

        EEmpWorkExp.db.populate(obj, values);

        Binding eBinding;

        eBinding = new Binding(dbConn, EEmpWorkExp.db);
        eBinding.add(new BlankZeroLabelVLBinder(EEmpWorkExp.db, (Label)e.Item.FindControl("EmpWorkExpFromMonth"), Values.VLMonth));
        eBinding.add(new BlankZeroLabelVLBinder(EEmpWorkExp.db, (Label)e.Item.FindControl("EmpWorkExpFromYear"), new WFTextList(new string[] {})));
        eBinding.add(new BlankZeroLabelVLBinder(EEmpWorkExp.db, (Label)e.Item.FindControl("EmpWorkExpToMonth"), Values.VLMonth));
        eBinding.add(new BlankZeroLabelVLBinder(EEmpWorkExp.db, (Label)e.Item.FindControl("EmpWorkExpToYear"), new WFTextList(new string[] { })));



        eBinding.init(Request, Session);

        eBinding.toControl(values);
    }
    protected void Repeater_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        DataRowView row = (DataRowView)e.Item.DataItem;
        CheckBox    cb  = (CheckBox)e.Item.FindControl("ItemSelect");

        WebFormUtils.LoadKeys(db, row, cb);
        e.Item.FindControl("ItemSelect").Visible = toolBar.DeleteButton_Visible;

        Binding ebinding;

        EAttendancePreparationProcess obj = new EAttendancePreparationProcess();

        db.toObject(((DataRowView)e.Item.DataItem).Row, obj);

        if (obj.AttendancePreparationProcessID > 0)
        {
            ((Label)e.Item.FindControl("AttendancePreparationProcessPayDate")).Text = obj.AttendancePreparationProcessPayDate.ToString("yyyy-MM-dd");
            switch (obj.AttendancePreparationProcessStatus)
            {
            case EAttendancePreparationProcess.STATUS_NORMAL:
                ((Label)e.Item.FindControl("AttendancePreparationProcessStatus")).Text = EAttendancePreparationProcess.STATUS_NORMAL_DESC;
                break;

            case EAttendancePreparationProcess.STATUS_CONFIRMED:
                ((Label)e.Item.FindControl("AttendancePreparationProcessStatus")).Text = EAttendancePreparationProcess.STATUS_CONFIRMED_DESC;
                break;

            case EAttendancePreparationProcess.STATUS_CANCELLED:
                ((Label)e.Item.FindControl("AttendancePreparationProcessStatus")).Text = EAttendancePreparationProcess.STATUS_CANCELLED_DESC;
                break;
            }
        }
    }
    protected void empRepeater_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        DataRowView row = (DataRowView)e.Item.DataItem;
        CheckBox    cb  = (CheckBox)e.Item.FindControl("ItemSelect");

        WebFormUtils.LoadKeys(EEmpPersonalInfo.db, row, cb);
    }
Пример #14
0
    protected void Repeater_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        DataRowView row = (DataRowView)e.Item.DataItem;
        CheckBox    cb  = (CheckBox)e.Item.FindControl("ItemSelect");

        WebFormUtils.LoadKeys(ECostCenter.db, row, cb);



        //if (!Page.IsPostBack)
        //{
        DBFilter empCostCenterDetailFilter = new DBFilter();

        empCostCenterDetailFilter.add(new Match("EmpCostCenterID", CurID));
        empCostCenterDetailFilter.add(new Match("CostCenterID", row["CostCenterID"]));
        ArrayList empCostCenterDetailList = EEmpCostCenterDetail.db.select(dbConn, empCostCenterDetailFilter);

        if (empCostCenterDetailList.Count != 0)
        {
            TextBox textBox = (TextBox)e.Item.FindControl("EmpCostCenterPercentage");
            textBox.Text = ((EEmpCostCenterDetail)empCostCenterDetailList[0]).EmpCostCenterPercentage.ToString("0.00");
            //cb.Checked = true;
        }
        //}
    }
    protected void Repeater_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        DataRowView row = (DataRowView)e.Item.DataItem;
        CheckBox    cb  = (CheckBox)e.Item.FindControl("ItemSelect");

        WebFormUtils.LoadKeys(sdb, row, cb);
        e.Item.FindControl("ItemSelect").Visible = toolBar.DeleteButton_Visible;


        EEmpPositionInfo obj = new EEmpPositionInfo();

        EEmpPositionInfo.db.toObject(((DataRowView)e.Item.DataItem).Row, obj);
        Hashtable values = new Hashtable();

        EEmpPositionInfo.db.populate(obj, values);

        Binding eBinding;

        eBinding = new Binding(dbConn, EEmpPositionInfo.db);
        eBinding.add(new BlankZeroLabelVLBinder(EEmpPositionInfo.db, (Label)e.Item.FindControl("CompanyID"), ECompany.VLCompany));
        eBinding.add(new BlankZeroLabelVLBinder(EEmpPositionInfo.db, (Label)e.Item.FindControl("PositionID"), EPosition.VLPosition));
        eBinding.add(new BlankZeroLabelVLBinder(EEmpPositionInfo.db, (Label)e.Item.FindControl("RankID"), ERank.VLRank));
        eBinding.add(new BlankZeroLabelVLBinder(EEmpPositionInfo.db, (Label)e.Item.FindControl("StaffTypeID"), EStaffType.VLStaffType));
        eBinding.add(new BlankZeroLabelVLBinder(EEmpPositionInfo.db, (Label)e.Item.FindControl("LeavePlanID"), ELeavePlan.VLLeavePlan));
        eBinding.add(new BlankZeroLabelVLBinder(EEmpPositionInfo.db, (Label)e.Item.FindControl("PayGroupID"), EPayrollGroup.VLPayrollGroup));



        eBinding.init(Request, Session);

        eBinding.toControl(values);
    }
Пример #16
0
    protected void Repeater_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        DataRowView row = (DataRowView)e.Item.DataItem;

        EInbox obj = new EInbox();

        db.toObject(((DataRowView)e.Item.DataItem).Row, obj);

        CheckBox cb = (CheckBox)e.Item.FindControl("ItemSelect");

        WebFormUtils.LoadKeys(db, row, cb);

        if (obj.UserID.Equals(0))
        {
            cb.Visible = false;
        }
        Label InboxFromUserName = (Label)e.Item.FindControl("InboxFromUserName");
        Label InboxCreateDate   = (Label)e.Item.FindControl("InboxCreateDate");
        Label InboxSubject      = (Label)e.Item.FindControl("InboxSubject");

        InboxFromUserName.Text = obj.InboxFromUserName;
        InboxCreateDate.Text   = obj.InboxCreateDate.ToString("yyyy-MM-dd HH:mm:ss");
        InboxSubject.Text      = obj.InboxSubject;

        if (obj.InboxReadDate.Ticks.Equals(0))
        {
            InboxFromUserName.Font.Bold = true;
            InboxCreateDate.Font.Bold   = true;
            InboxSubject.Font.Bold      = true;
        }

        cb.Visible = toolBar.DeleteButton_Visible;
    }
    protected void Repeater_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        DataRowView row = (DataRowView)e.Item.DataItem;
        CheckBox    cb  = (CheckBox)e.Item.FindControl("ItemSelect");

        WebFormUtils.LoadKeys(EEmpPayroll.db, row, cb);
        cb.Visible = IsAllowEdit;

        if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
        {
            Binding ebinding = new Binding(dbConn, EEmpPayroll.db);
            ebinding.add(new BlankZeroLabelVLBinder(EEmpPayroll.db, (Label)e.Item.FindControl("EmpPayConfirmBy"), EUser.VLUserName));
            ebinding.init(Request, Session);


            EEmpPayroll obj = new EEmpPayroll();
            EEmpPayroll.db.toObject(((DataRowView)e.Item.DataItem).Row, obj);
            Hashtable values = new Hashtable();
            EEmpPayroll.db.populate(obj, values);
            ebinding.toControl(values);

            string[] payrollProcessTypeDescriptionList = obj.PayrollProcessTypeDescription();
            for (int i = 0; i < payrollProcessTypeDescriptionList.Length; i++)
            {
                payrollProcessTypeDescriptionList[i] = HROne.Common.WebUtility.GetLocalizedString(payrollProcessTypeDescriptionList[i], ci);
            }

            ((Label)e.Item.FindControl("Type")).Text = string.Join(" + ", payrollProcessTypeDescriptionList);
        }
    }
    protected void LeaveTypeRepeater_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        DataRowView row = (DataRowView)e.Item.DataItem;
        CheckBox    cb  = (CheckBox)e.Item.FindControl("ItemSelect");

        WebFormUtils.LoadKeys(ELeaveType.db, row, cb);
        cb.Text = leaveTypeBinding.getValue(row, "LeaveTypeDesc");
    }
Пример #19
0
    protected void Repeater_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        DataRowView row = (DataRowView)e.Item.DataItem;
        CheckBox    cb  = (CheckBox)e.Item.FindControl("ItemSelect");

        WebFormUtils.LoadKeys(db, row, cb);
        cb.Visible = toolBar.DeleteButton_Visible & !row["PayFormIsSys"].ToString().Equals("Y");
    }
Пример #20
0
    protected void Repeater_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        DataRowView row = (DataRowView)e.Item.DataItem;
        CheckBox    cb  = (CheckBox)e.Item.FindControl("ItemSelect");

        WebFormUtils.LoadKeys(db, row, cb);
        e.Item.FindControl("ItemSelect").Visible = toolBar.DeleteButton_Visible;
    }
Пример #21
0
    protected void Repeater_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        DataRowView row = (DataRowView)e.Item.DataItem;
        CheckBox    cb  = (CheckBox)e.Item.FindControl("ItemSelect");

        WebFormUtils.LoadKeys(EEmpTrainingEnroll.db, row, cb);
        cb.Visible = btnRemove.Visible;
    }
Пример #22
0
    protected void Repeater_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        DataRowView row = (DataRowView)e.Item.DataItem;
        CheckBox    cb  = (CheckBox)e.Item.FindControl("ItemSelect");

        cb.Checked = true;
        WebFormUtils.LoadKeys(db, row, cb);
    }
Пример #23
0
    // Start 0000069, KuangWei, 2014-08-26
    protected void PayGroup_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        DataRowView row = (DataRowView)e.Item.DataItem;
        CheckBox    cb  = (CheckBox)e.Item.FindControl("ItemSelect");

        WebFormUtils.LoadKeys(EPayrollGroup.db, row, cb);

        if (CurPayGroups.ContainsKey(row["PayGroupID"]))
        {
            cb.Checked = true;
        }
    }
Пример #24
0
    protected void Users_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        DataRowView row = (DataRowView)e.Item.DataItem;
        CheckBox    cb  = (CheckBox)e.Item.FindControl("UserSelect");

        WebFormUtils.LoadKeys(EUser.db, row, cb);

        if (CurUsers.ContainsKey(row["UserID"]))
        {
            cb.Checked = true;
        }
    }
Пример #25
0
    protected void Repeater_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        DataRowView row = (DataRowView)e.Item.DataItem;
        CheckBox    cb  = (CheckBox)e.Item.FindControl("ItemSelect");

        WebFormUtils.LoadKeys(EEmpPayroll.db, row, cb);
        cb.Visible = IsAllowEdit;
        if (cb.Visible == true)
        {
            cb.Checked = true;
        }
    }
    protected void Repeater_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        DataRowView row = (DataRowView)e.Item.DataItem;
        CheckBox    cb  = (CheckBox)e.Item.FindControl("ItemSelect");

        WebFormUtils.LoadKeys(sdb, row, cb);
        e.Item.FindControl("ItemSelect").Visible = toolBar.DeleteButton_Visible;

        ELeaveBalanceAdjustment obj = new ELeaveBalanceAdjustment();

        sdb.toObject(row.Row, obj);
    }
    protected void Repeater_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        DataRowView row = (DataRowView)e.Item.DataItem;
        CheckBox    cb  = (CheckBox)e.Item.FindControl("ItemSelect");

        WebFormUtils.LoadKeys(sdb, row, cb);
        Button cancelButton = (Button)e.Item.FindControl("Cancel");
        Button SignButton   = (Button)e.Item.FindControl("Sign");
        Label  SignedBy     = (Label)e.Item.FindControl("SignedBy");

        ECompanyMPFFile obj = new ECompanyMPFFile();

        sdb.toObject(row.Row, obj);
        cb.Visible = false;

        if (!isAuthorizer || !obj.CompanyMPFFileConfirmDateTime.Ticks.Equals(0))
        {
            SignButton.Visible = false;
        }
        else
        {
            SignButton.Visible = true;
        }

        if (!obj.CompanyMPFFileConsolidateDateTime.Ticks.Equals(0) || bankFileLastCancelTime < AppUtils.ServerDateTime())
        {
            cancelButton.Visible = false;
        }
        else
        {
            cancelButton.Visible       = IsAllowEdit;
            cancelButton.OnClientClick = HROne.Translation.PromptMessage.CreateDeleteConfirmDialogJavascript(cancelButton);
        }

        DBFilter countSignatureFilter = new DBFilter();

        countSignatureFilter.add(new Match("CompanyMPFFileID", obj.CompanyMPFFileID));
        countSignatureFilter.add(new Match("CompanyDBID", CurID));
        ArrayList signedList = ECompanyMPFFileSignature.db.select(masterDBConn, countSignatureFilter);

        foreach (ECompanyMPFFileSignature signature in signedList)
        {
            if (string.IsNullOrEmpty(SignedBy.Text))
            {
                SignedBy.Text = signature.CompanyMPFFileSignatureUserName;
            }
            else
            {
                SignedBy.Text += ",<br/>" + signature.CompanyMPFFileSignatureUserName;
            }
        }
    }
Пример #28
0
    protected void Repeater_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        DataRowView row = (DataRowView)e.Item.DataItem;
        CheckBox    cb  = (CheckBox)e.Item.FindControl("ItemSelect");

        WebFormUtils.LoadKeys(sdb, row, cb);

        ECompanyMPFFile obj = new ECompanyMPFFile();

        sdb.toObject(row.Row, obj);

        cb.Visible = false;
    }
    protected void Repeater_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        DataRowView row = (DataRowView)e.Item.DataItem;
        CheckBox    cb  = (CheckBox)e.Item.FindControl("ItemSelect");

        WebFormUtils.LoadKeys(db, row, cb);

        cb.Visible = IsAllowEdit;
        HtmlInputHidden h = (HtmlInputHidden)e.Item.FindControl("TaxEmpID");

        h.Value = ((DataRowView)e.Item.DataItem)["TaxEmpID"].ToString();
        e.Item.FindControl("ItemSelect").Visible = false;
    }
Пример #30
0
    protected void companyRepeater_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
        {
            DataRowView row            = (DataRowView)e.Item.DataItem;
            CheckBox    cb             = (CheckBox)e.Item.FindControl("ItemSelect");
            Label       CompanyIDLabel = (Label)e.Item.FindControl("CompanyID");
            WebFormUtils.LoadKeys(ECompany.db, row, cb);

            ECompany company = new ECompany();
            ECompany.db.toObject(row.Row, company);
            CompanyIDLabel.Text = string.Format("{0} - {1}", new string[] { company.CompanyCode, company.CompanyName });
        }
    }