Example #1
0
        private void displayDetailLabel(TaskEntryData ted)
        {
            SqlHandling sh = new SqlHandling("M_Members");

            string[] mCodeArray = new string[2];
            string[] mNameArray = new string[2];
            mCodeArray[0] = ted.LeaderMCode;
            mCodeArray[1] = ted.SalesMCode;
            MembersData md = new MembersData();

            for (int i = 0; i < mCodeArray.Length; i++)
            {
                if (!String.IsNullOrEmpty(mCodeArray[i]))
                {
                    mNameArray[i] = md.SelectMemberName(mCodeArray[i]);
                }
            }

            clearDetailLabel();
            // 業務担当者
            if (!String.IsNullOrEmpty(mNameArray[0]))
            {
                labelTtlLeader.Visible = true;
                labelLeaderName.Text   = mNameArray[0];
            }
            // 営業担当者
            if (!String.IsNullOrEmpty(mNameArray[1]))
            {
                labelTtlSales.Visible = true;
                labelSalesMName.Text  = mNameArray[1];
            }
            // 契約日
            if (DHandling.CheckDateMiniValue(ted.ContractDate))
            {
                labelContractDate.Text = "契約日: " + DHandling.PickUpTopCharacters(Convert.ToString(ted.ContractDate), 10);
            }
            // 工期 開始日
            if (DHandling.CheckDateMiniValue(ted.StartDate))
            {
                labelStartDate.Text = "工期: " + DHandling.PickUpTopCharacters(Convert.ToString(ted.StartDate), 10);
            }
            // 工期 終了日
            if (DHandling.CheckDateMiniValue(ted.EndDate))
            {
                labelStartDate.Text += "  ~  " + DHandling.PickUpTopCharacters(Convert.ToString(ted.EndDate), 10);
            }
        }
Example #2
0
        private bool displayTaskData(TaskCodeNameData tcds)
        {
            if (tcds == null)
            {
                return(false);
            }

            textBoxTaskName.Text = tcds.TaskName;
            if (String.IsNullOrEmpty(tcds.TaskCode.Trim()))
            {
                // 仮業務番号で運用中
                TaskEntryData tid = new TaskEntryData();
                tid = tid.SelectTaskEntryData(tcds.TaskID);

                MembersData md = new MembersData();
                labelLeaderName.Text = "業務責任者: " + md.SelectMemberName(tid.LeaderMCode);
                labelTaskPlace.Text  = tid.TaskPlace;
                labelSalesMName.Text = "営業責任者: " + md.SelectMemberName(tid.SalesMCode);
                if (DHandling.CheckDateMiniValue(tid.StartDate))
                {
                    labelStartDate.Text = "工期: " + tid.StartDate.ToString("d");
                }
                if (DHandling.CheckDateMiniValue(tid.EndDate))
                {
                    labelStartDate.Text += "  ~  " + tid.EndDate.ToString("d");
                }

                PartnersData pd = new PartnersData();
                labelPartner.Text     = pd.SelectPartnerName(tid.PartnerCode);
                labelPartnerCode.Text = tid.PartnerCode;
            }
            else
            {
                // 正式な業務番号が設定されている
                labelTaskCode.Text    = tcds.TaskCode;
                labelTtlTName.Visible = true;
                labelTaskName.Text    = tcds.TaskName;
                TaskIndData tid = new TaskIndData();
                tid = tid.SelectTaskIndData(tcds.TaskCode);
                if (tid == null)
                {
                    return(false);
                }

                MembersData md = new MembersData();
                // 業務担当者名
                labelTtlLeader.Visible = true;
                labelLeaderName.Text   = md.SelectMemberName(tid.LeaderMCode);

                TaskData td = new TaskData();
                td = td.SelectTaskData(tid.TaskID);
                if (td == null)
                {
                    return(false);
                }

                labelTaskPlace.Text = td.TaskPlace;
                // 営業担当者名
                labelTtlSales.Visible  = true;
                labelSalesMName.Text   = md.SelectMemberName(td.SalesMCode);
                labelContractDate.Text = "契約日: " + td.IssueDate.ToString("yyyy/MM/dd");
                if (DHandling.CheckDateMiniValue(td.StartDate))
                {
                    labelStartDate.Text = "工期: " + td.StartDate.ToString("d");
                }
                if (DHandling.CheckDateMiniValue(td.EndDate))
                {
                    labelStartDate.Text += "  ~  " + td.EndDate.ToString("d");
                }

                PartnersData pd = new PartnersData();
                labelPartner.Text     = pd.SelectPartnerName(td.PartnerCode);
                labelPartnerCode.Text = td.PartnerCode;

                setTaskCodeToTaskEntryData(tid, td);
            }
            return(true);
        }