string getpageCaption(DataForPrint.Estimate opt) { if (opt == DataForPrint.Estimate.AVG) { return("Средний %"); } if (opt == DataForPrint.Estimate.qty) { return("Количество и продолжительность"); } if (opt == DataForPrint.Estimate.duration) { return("Количество и продолжительность"); } if (opt == DataForPrint.Estimate.AVGDuration) { return("Количество и продолжительность"); } if (opt == DataForPrint.Estimate.Objection) { return("Статистика возражений"); } if (opt == DataForPrint.Estimate.badPoints) { return("Плохо выполняемые пункты"); } return(""); }
public static int getFormatData(DataForPrint.Estimate opt) { if (opt == DataForPrint.Estimate.AVG) { return(10); } if (opt == DataForPrint.Estimate.qty) { return(1); } if (opt == DataForPrint.Estimate.duration) { return(46); } if (opt == DataForPrint.Estimate.AVGDuration) { return(46); } if (opt == DataForPrint.Estimate.Objection) { return(1); } return(0); }
string gettableCaption(DataForPrint.Estimate opt, bool qtyFull = true) { if (opt == DataForPrint.Estimate.AVG) { return("Средний %"); } if (opt == DataForPrint.Estimate.qty && qtyFull) { return("Количество"); } if (opt == DataForPrint.Estimate.qty && !qtyFull) { return("Количество без входящих и было не удобно разговаривать"); } if (opt == DataForPrint.Estimate.duration) { return("Продолжительность"); } if (opt == DataForPrint.Estimate.AVGDuration) { return("Средняя продолжительность"); } if (opt == DataForPrint.Estimate.Objection) { return("Статистика возражений"); } if (opt == DataForPrint.Estimate.badPoints) { return("Плохо выполняемые пункты"); } return(""); }
string getValueOfPointOfManager(List <DataForPrint> managers, string manager, DataForPrint.Estimate opt, bool qtyFull = true) { string returnValue = ""; foreach (var man in managers) { if (man.manager == manager) { if (opt == DataForPrint.Estimate.AVG) { System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-US"); returnValue = man.AVGPercent == -1 ? "" : String.Format("{0:0.####}", man.AVGPercent); } if (opt == DataForPrint.Estimate.qty && qtyFull) { returnValue = man.qty.ToString(); } if (opt == DataForPrint.Estimate.qty && !qtyFull) { returnValue = man.qtyWithoutIncoming.ToString(); } if (opt == DataForPrint.Estimate.duration) { returnValue = man.duration.ToString(); } if (opt == DataForPrint.Estimate.badPoints) { returnValue = man.BadPoints.ToString(); } if (opt == DataForPrint.Estimate.AVGDuration) { returnValue = man.AVGduration.ToString(); } break; } } return(returnValue); }